From 5c91743c1d665643201076d86bd66fc2ead069a9 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 3 Apr 2024 14:58:13 -0700 Subject: [PATCH 1/8] Add otlploghttp module --- exporters/otlp/otlplog/otlploghttp/go.mod | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 exporters/otlp/otlplog/otlploghttp/go.mod diff --git a/exporters/otlp/otlplog/otlploghttp/go.mod b/exporters/otlp/otlplog/otlploghttp/go.mod new file mode 100644 index 00000000000..d3a9c1cf711 --- /dev/null +++ b/exporters/otlp/otlplog/otlploghttp/go.mod @@ -0,0 +1,3 @@ +module go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp + +go 1.21 From b492f4c4358b546ae309de940aabdbcd19c1d081 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 3 Apr 2024 14:59:43 -0700 Subject: [PATCH 2/8] Update dependabot conf --- .github/dependabot.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index aeacd58ea5a..59b93d208cd 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -127,6 +127,15 @@ updates: schedule: interval: weekly day: sunday + - package-ecosystem: gomod + directory: /exporters/otlp/otlplog/otlploghttp + labels: + - dependencies + - go + - Skip Changelog + schedule: + interval: weekly + day: sunday - package-ecosystem: gomod directory: /exporters/otlp/otlpmetric/otlpmetricgrpc labels: From 0331927f7c81d0732bbf21b7c495b8206720c8ce Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 3 Apr 2024 15:00:26 -0700 Subject: [PATCH 3/8] Update versions.yaml --- versions.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/versions.yaml b/versions.yaml index 21825dc1376..13880032285 100644 --- a/versions.yaml +++ b/versions.yaml @@ -44,3 +44,4 @@ module-sets: excluded-modules: - go.opentelemetry.io/otel/internal/tools - go.opentelemetry.io/otel/sdk/log + - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp From 1dbf009acbb97824e3a5a5f18efb5ecbe24884d0 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 3 Apr 2024 15:02:19 -0700 Subject: [PATCH 4/8] Add skeleton doc --- exporters/otlp/otlplog/README.md | 4 ++++ exporters/otlp/otlplog/otlploghttp/README.md | 3 +++ exporters/otlp/otlplog/otlploghttp/doc.go | 6 ++++++ 3 files changed, 13 insertions(+) create mode 100644 exporters/otlp/otlplog/README.md create mode 100644 exporters/otlp/otlplog/otlploghttp/README.md create mode 100644 exporters/otlp/otlplog/otlploghttp/doc.go diff --git a/exporters/otlp/otlplog/README.md b/exporters/otlp/otlplog/README.md new file mode 100644 index 00000000000..2a1e61845d1 --- /dev/null +++ b/exporters/otlp/otlplog/README.md @@ -0,0 +1,4 @@ +# OTLP Log Exporters + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/exporters/otlp/otlplog)](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlplog) + diff --git a/exporters/otlp/otlplog/otlploghttp/README.md b/exporters/otlp/otlplog/otlploghttp/README.md new file mode 100644 index 00000000000..14c240b0774 --- /dev/null +++ b/exporters/otlp/otlplog/otlploghttp/README.md @@ -0,0 +1,3 @@ +# OTLP Log HTTP Exporter + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp)](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp) diff --git a/exporters/otlp/otlplog/otlploghttp/doc.go b/exporters/otlp/otlplog/otlploghttp/doc.go new file mode 100644 index 00000000000..0d0ab6a5dd2 --- /dev/null +++ b/exporters/otlp/otlplog/otlploghttp/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package otlploghttp provides an OTLP log exporter. The exporter uses HTTP to +// transport OTLP protobuf payloads. +package otlploghttp // import "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp" From 2e8040abb22f50c60c677385bf2f37231352cf3a Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 3 Apr 2024 15:52:00 -0700 Subject: [PATCH 5/8] Add skeleton otlploghttp Exporter --- exporters/otlp/otlplog/otlploghttp/client.go | 14 ++ exporters/otlp/otlplog/otlploghttp/config.go | 198 ++++++++++++++++++ .../otlp/otlplog/otlploghttp/exporter.go | 53 +++++ exporters/otlp/otlplog/otlploghttp/go.mod | 19 ++ exporters/otlp/otlplog/otlploghttp/go.sum | 31 +++ exporters/otlp/otlplog/otlploghttp/version.go | 9 + .../otlp/otlplog/otlploghttp/version_test.go | 21 ++ 7 files changed, 345 insertions(+) create mode 100644 exporters/otlp/otlplog/otlploghttp/client.go create mode 100644 exporters/otlp/otlplog/otlploghttp/config.go create mode 100644 exporters/otlp/otlplog/otlploghttp/exporter.go create mode 100644 exporters/otlp/otlplog/otlploghttp/go.sum create mode 100644 exporters/otlp/otlplog/otlploghttp/version.go create mode 100644 exporters/otlp/otlplog/otlploghttp/version_test.go diff --git a/exporters/otlp/otlplog/otlploghttp/client.go b/exporters/otlp/otlplog/otlploghttp/client.go new file mode 100644 index 00000000000..5d94868d0b0 --- /dev/null +++ b/exporters/otlp/otlplog/otlploghttp/client.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlploghttp // import "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp" + +type client struct { + // TODO: implement. +} + +// newClient creates a new HTTP log client. +func newClient(cfg config) (*client, error) { + // TODO: implement. + return &client{}, nil +} diff --git a/exporters/otlp/otlplog/otlploghttp/config.go b/exporters/otlp/otlplog/otlploghttp/config.go new file mode 100644 index 00000000000..b15a92122af --- /dev/null +++ b/exporters/otlp/otlplog/otlploghttp/config.go @@ -0,0 +1,198 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlploghttp // import "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp" + +import ( + "crypto/tls" + "net/http" + "net/url" + "time" +) + +// Option applies an option to the Exporter. +type Option interface { + applyHTTPOption(config) config +} + +type config struct { + // TODO: implement. +} + +func newConfig(options []Option) config { + var c config + for _, opt := range options { + c = opt.applyHTTPOption(c) + } + return c +} + +// WithEndpoint sets the target endpoint the Exporter will connect to. This +// endpoint is specified as a host and optional port, no path or scheme should +// be included (see WithInsecure and WithURLPath). +// +// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_LOGS_ENDPOINT +// environment variable is set, and this option is not passed, that variable +// value will be used. If both are set, OTEL_EXPORTER_OTLP_LOGS_ENDPOINT +// will take precedence. +// +// By default, if an environment variable is not set, and this option is not +// passed, "localhost:4318" will be used. +func WithEndpoint(endpoint string) Option { + // TODO: implement. + return nil +} + +// WithEndpointURL sets the target endpoint URL the Exporter will connect to. +// +// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_LOGS_ENDPOINT +// environment variable is set, and this option is not passed, that variable +// value will be used. If both are set, OTEL_EXPORTER_OTLP_LOGS_ENDPOINT +// will take precedence. +// +// If both this option and WithEndpoint are used, the last used option will +// take precedence. +// +// If an invalid URL is provided, the default value will be kept. +// +// By default, if an environment variable is not set, and this option is not +// passed, "localhost:4318" will be used. +func WithEndpointURL(u string) Option { + // TODO: implement. + return nil +} + +// Compression describes the compression used for payloads sent to the +// collector. +type Compression int + +// WithCompression sets the compression strategy the Exporter will use to +// compress the HTTP body. +// +// If the OTEL_EXPORTER_OTLP_COMPRESSION or +// OTEL_EXPORTER_OTLP_LOGS_COMPRESSION environment variable is set, and +// this option is not passed, that variable value will be used. That value can +// be either "none" or "gzip". If both are set, +// OTEL_EXPORTER_OTLP_LOGS_COMPRESSION will take precedence. +// +// By default, if an environment variable is not set, and this option is not +// passed, no compression strategy will be used. +func WithCompression(compression Compression) Option { + // TODO: implement. + return nil +} + +// WithURLPath sets the URL path the Exporter will send requests to. +// +// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_LOGS_ENDPOINT +// environment variable is set, and this option is not passed, the path +// contained in that variable value will be used. If both are set, +// OTEL_EXPORTER_OTLP_LOGS_ENDPOINT will take precedence. +// +// By default, if an environment variable is not set, and this option is not +// passed, "/v1/logs" will be used. +func WithURLPath(urlPath string) Option { + // TODO: implement. + return nil +} + +// WithTLSClientConfig sets the TLS configuration the Exporter will use for +// HTTP requests. +// +// If the OTEL_EXPORTER_OTLP_CERTIFICATE or +// OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE environment variable is set, and +// this option is not passed, that variable value will be used. The value will +// be parsed the filepath of the TLS certificate chain to use. If both are +// set, OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE will take precedence. +// +// By default, if an environment variable is not set, and this option is not +// passed, the system default configuration is used. +func WithTLSClientConfig(tlsCfg *tls.Config) Option { + // TODO: implement. + return nil +} + +// WithInsecure disables client transport security for the Exporter's HTTP +// connection. +// +// If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_LOGS_ENDPOINT +// environment variable is set, and this option is not passed, that variable +// value will be used to determine client security. If the endpoint has a +// scheme of "http" or "unix" client security will be disabled. If both are +// set, OTEL_EXPORTER_OTLP_LOGS_ENDPOINT will take precedence. +// +// By default, if an environment variable is not set, and this option is not +// passed, client security will be used. +func WithInsecure() Option { + // TODO: implement. + return nil +} + +// WithHeaders will send the provided headers with each HTTP requests. +// +// If the OTEL_EXPORTER_OTLP_HEADERS or OTEL_EXPORTER_OTLP_LOGS_HEADERS +// environment variable is set, and this option is not passed, that variable +// value will be used. The value will be parsed as a list of key value pairs. +// These pairs are expected to be in the W3C Correlation-Context format +// without additional semi-colon delimited metadata (i.e. "k1=v1,k2=v2"). If +// both are set, OTEL_EXPORTER_OTLP_LOGS_HEADERS will take precedence. +// +// By default, if an environment variable is not set, and this option is not +// passed, no user headers will be set. +func WithHeaders(headers map[string]string) Option { + // TODO: implement. + return nil +} + +// WithTimeout sets the max amount of time an Exporter will attempt an export. +// +// This takes precedence over any retry settings defined by WithRetry. Once +// this time limit has been reached the export is abandoned and the log data is +// dropped. +// +// If the OTEL_EXPORTER_OTLP_TIMEOUT or OTEL_EXPORTER_OTLP_LOGS_TIMEOUT +// environment variable is set, and this option is not passed, that variable +// value will be used. The value will be parsed as an integer representing the +// timeout in milliseconds. If both are set, +// OTEL_EXPORTER_OTLP_LOGS_TIMEOUT will take precedence. +// +// By default, if an environment variable is not set, and this option is not +// passed, a timeout of 10 seconds will be used. +func WithTimeout(duration time.Duration) Option { + // TODO: implement. + return nil +} + +// RetryConfig defines configuration for retrying the export of log data that +// failed. +type RetryConfig struct { + // TODO: implement. +} + +// WithRetry sets the retry policy for transient retryable errors that are +// returned by the target endpoint. +// +// If the target endpoint responds with not only a retryable error, but +// explicitly returns a backoff time in the response, that time will take +// precedence over these settings. +// +// If unset, the default retry policy will be used. It will retry the export +// 5 seconds after receiving a retryable error and increase exponentially +// after each error for no more than a total time of 1 minute. +func WithRetry(rc RetryConfig) Option { + // TODO: implement. + return nil +} + +// HTTPTransportProxyFunc is a function that resolves which URL to use as proxy +// for a given request. This type is compatible with http.Transport.Proxy and +// can be used to set a custom proxy function to the OTLP HTTP client. +type HTTPTransportProxyFunc func(*http.Request) (*url.URL, error) + +// WithProxy sets the Proxy function the client will use to determine the +// proxy to use for an HTTP request. If this option is not used, the client +// will use [http.ProxyFromEnvironment]. +func WithProxy(pf HTTPTransportProxyFunc) Option { + // TODO: implement. + return nil +} diff --git a/exporters/otlp/otlplog/otlploghttp/exporter.go b/exporters/otlp/otlplog/otlploghttp/exporter.go new file mode 100644 index 00000000000..5ca9822a8ff --- /dev/null +++ b/exporters/otlp/otlplog/otlploghttp/exporter.go @@ -0,0 +1,53 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlploghttp // import "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp" + +import ( + "context" + + "go.opentelemetry.io/otel/sdk/log" +) + +// Exporter is a OpenTelemetry log Exporter. It transports log data encoded as +// OTLP protobufs using HTTP. +type Exporter struct { + // TODO: implement. +} + +// Compile-time check Exporter implements [log.Exporter]. +var _ log.Exporter = (*Exporter)(nil) + +// New returns a new [Exporter]. +func New(_ context.Context, options ...Option) (*Exporter, error) { + cfg := newConfig(options) + c, err := newClient(cfg) + if err != nil { + return nil, err + } + return newExporter(c, cfg) +} + +func newExporter(*client, config) (*Exporter, error) { + // TODO: implement + return &Exporter{}, nil +} + +// Export transforms and transmits log records to an OTLP receiver. +func (e *Exporter) Export(ctx context.Context, records []log.Record) error { + // TODO: implement. + return nil +} + +// Shutdown shuts down the Exporter. Calls to Export or ForceFlush will perform +// no operation after this is called. +func (e *Exporter) Shutdown(ctx context.Context) error { + // TODO: implement. + return nil +} + +// ForceFlush does nothing. The Exporter holds no state. +func (e *Exporter) ForceFlush(ctx context.Context) error { + // TODO: implement. + return nil +} diff --git a/exporters/otlp/otlplog/otlploghttp/go.mod b/exporters/otlp/otlplog/otlploghttp/go.mod index d3a9c1cf711..a023d46c2fa 100644 --- a/exporters/otlp/otlplog/otlploghttp/go.mod +++ b/exporters/otlp/otlplog/otlploghttp/go.mod @@ -1,3 +1,22 @@ module go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp go 1.21 + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/otel/sdk/log v0.0.0-20240403115316-6c6e1e7416e9 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/log v0.0.1-alpha // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + golang.org/x/sys v0.18.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/exporters/otlp/otlplog/otlploghttp/go.sum b/exporters/otlp/otlplog/otlploghttp/go.sum new file mode 100644 index 00000000000..9f48a4ea2ab --- /dev/null +++ b/exporters/otlp/otlplog/otlploghttp/go.sum @@ -0,0 +1,31 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/log v0.0.1-alpha h1:Gy4SxFnkHv2wmmzv//sblb4/PoCYVtuZbdFY/XamvHM= +go.opentelemetry.io/otel/log v0.0.1-alpha/go.mod h1:fg1zxLfxAyzlCLyULJTWXUbFVYyOwQZD/DgtGm7VvgA= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/sdk/log v0.0.0-20240403115316-6c6e1e7416e9 h1:JdFT8k4Cs/pkDLv7ofG4g6knnQHCj8EZkDYwCnfqRSk= +go.opentelemetry.io/otel/sdk/log v0.0.0-20240403115316-6c6e1e7416e9/go.mod h1:AFzrrrUMbcZo80ZqCAZDv9Ida/crl5/MEVBzFGp/pF0= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/exporters/otlp/otlplog/otlploghttp/version.go b/exporters/otlp/otlplog/otlploghttp/version.go new file mode 100644 index 00000000000..2c7997d9c17 --- /dev/null +++ b/exporters/otlp/otlplog/otlploghttp/version.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlploghttp // import "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp" + +// Version is the current release version of the OpenTelemetry OTLP over HTTP/protobuf metrics exporter in use. +func Version() string { + return "0.0.0" +} diff --git a/exporters/otlp/otlplog/otlploghttp/version_test.go b/exporters/otlp/otlplog/otlploghttp/version_test.go new file mode 100644 index 00000000000..05f3fc09eb1 --- /dev/null +++ b/exporters/otlp/otlplog/otlploghttp/version_test.go @@ -0,0 +1,21 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlploghttp + +import ( + "regexp" + "testing" + + "github.com/stretchr/testify/assert" +) + +// regex taken from https://github.com/Masterminds/semver/tree/v3.1.1 +var versionRegex = regexp.MustCompile(`^v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` + + `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + + `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?$`) + +func TestVersionSemver(t *testing.T) { + v := Version() + assert.NotNil(t, versionRegex.FindStringSubmatch(v), "version is not semver: %s", v) +} From 38a20ca3133f1c88f8447b572b83dc8b96eefa04 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 3 Apr 2024 15:58:39 -0700 Subject: [PATCH 6/8] Add go.mod replacements --- exporters/otlp/otlplog/otlploghttp/go.mod | 12 ++++++++++++ exporters/otlp/otlplog/otlploghttp/go.sum | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/exporters/otlp/otlplog/otlploghttp/go.mod b/exporters/otlp/otlplog/otlploghttp/go.mod index a023d46c2fa..6fbeae876cd 100644 --- a/exporters/otlp/otlplog/otlploghttp/go.mod +++ b/exporters/otlp/otlplog/otlploghttp/go.mod @@ -20,3 +20,15 @@ require ( golang.org/x/sys v0.18.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace go.opentelemetry.io/otel => ../../../.. + +replace go.opentelemetry.io/otel/sdk/log => ../../../../sdk/log + +replace go.opentelemetry.io/otel/trace => ../../../../trace + +replace go.opentelemetry.io/otel/sdk => ../../../../sdk + +replace go.opentelemetry.io/otel/metric => ../../../../metric + +replace go.opentelemetry.io/otel/log => ../../../../log diff --git a/exporters/otlp/otlplog/otlploghttp/go.sum b/exporters/otlp/otlplog/otlploghttp/go.sum index 9f48a4ea2ab..e2eeaf7227b 100644 --- a/exporters/otlp/otlplog/otlploghttp/go.sum +++ b/exporters/otlp/otlplog/otlploghttp/go.sum @@ -11,18 +11,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= -go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= -go.opentelemetry.io/otel/log v0.0.1-alpha h1:Gy4SxFnkHv2wmmzv//sblb4/PoCYVtuZbdFY/XamvHM= -go.opentelemetry.io/otel/log v0.0.1-alpha/go.mod h1:fg1zxLfxAyzlCLyULJTWXUbFVYyOwQZD/DgtGm7VvgA= -go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= -go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= -go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= -go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= -go.opentelemetry.io/otel/sdk/log v0.0.0-20240403115316-6c6e1e7416e9 h1:JdFT8k4Cs/pkDLv7ofG4g6knnQHCj8EZkDYwCnfqRSk= -go.opentelemetry.io/otel/sdk/log v0.0.0-20240403115316-6c6e1e7416e9/go.mod h1:AFzrrrUMbcZo80ZqCAZDv9Ida/crl5/MEVBzFGp/pF0= -go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= -go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= From 776e70290009312fb4388529042011834313ee62 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 3 Apr 2024 16:08:04 -0700 Subject: [PATCH 7/8] Fix markdownlint --- exporters/otlp/otlplog/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/exporters/otlp/otlplog/README.md b/exporters/otlp/otlplog/README.md index 2a1e61845d1..5bde927cc49 100644 --- a/exporters/otlp/otlplog/README.md +++ b/exporters/otlp/otlplog/README.md @@ -1,4 +1,3 @@ # OTLP Log Exporters [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/exporters/otlp/otlplog)](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlplog) - From 17c4587a1e56fad70bc75d2ec3d354786eb985eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Thu, 4 Apr 2024 07:47:46 +0200 Subject: [PATCH 8/8] Update exporters/otlp/otlplog/otlploghttp/version.go --- exporters/otlp/otlplog/otlploghttp/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/otlp/otlplog/otlploghttp/version.go b/exporters/otlp/otlplog/otlploghttp/version.go index 2c7997d9c17..473d52ae776 100644 --- a/exporters/otlp/otlplog/otlploghttp/version.go +++ b/exporters/otlp/otlplog/otlploghttp/version.go @@ -3,7 +3,7 @@ package otlploghttp // import "go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp" -// Version is the current release version of the OpenTelemetry OTLP over HTTP/protobuf metrics exporter in use. +// Version is the current release version of the OpenTelemetry OTLP over HTTP/protobuf logs exporter in use. func Version() string { return "0.0.0" }