From 937813dccea4513323a15ec9a732a3cebb23c44c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:42:20 +0100 Subject: [PATCH 1/5] fix(deps): update github.com/opentracing-contrib/go-grpc digest to d08aa2b (#5945) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/opentracing-contrib/go-grpc](https://redirect.github.com/opentracing-contrib/go-grpc) | require | digest | `9dec25a` -> `d08aa2b` | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- bridge/opentracing/test/go.mod | 2 +- bridge/opentracing/test/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bridge/opentracing/test/go.mod b/bridge/opentracing/test/go.mod index 76ed911ba9c..2cca65cdf08 100644 --- a/bridge/opentracing/test/go.mod +++ b/bridge/opentracing/test/go.mod @@ -9,7 +9,7 @@ replace go.opentelemetry.io/otel/bridge/opentracing => ../ replace go.opentelemetry.io/otel/trace => ../../../trace require ( - github.com/opentracing-contrib/go-grpc v0.0.0-20240724223109-9dec25a38fa8 + github.com/opentracing-contrib/go-grpc v0.0.0-20241107023208-d08aa2b0b586 github.com/opentracing/opentracing-go v1.2.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/otel v1.31.0 diff --git a/bridge/opentracing/test/go.sum b/bridge/opentracing/test/go.sum index 1c8ecb0059f..1197cbf5731 100644 --- a/bridge/opentracing/test/go.sum +++ b/bridge/opentracing/test/go.sum @@ -10,8 +10,8 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 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/opentracing-contrib/go-grpc v0.0.0-20240724223109-9dec25a38fa8 h1:gHTSPFezGeYzTWCvpPM6lBanwXfuksik5Hy5MEHtvUA= -github.com/opentracing-contrib/go-grpc v0.0.0-20240724223109-9dec25a38fa8/go.mod h1:z1k3YVSdAPSXtMUPS1TBWG5DaNWlT+VCbB0Qm3QJe74= +github.com/opentracing-contrib/go-grpc v0.0.0-20241107023208-d08aa2b0b586 h1:vVs5x2SYbv+TVO4hbis8oaKhxb+H357cca767d0yZes= +github.com/opentracing-contrib/go-grpc v0.0.0-20241107023208-d08aa2b0b586/go.mod h1:74wyTbyHgouJIP3iSX4DB5pG8Q103k1eH0CgG+iQe4U= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= From b62a3fdd258ff800cfefd7599bb17fc811f4bc9f Mon Sep 17 00:00:00 2001 From: Seva Orlov Date: Thu, 7 Nov 2024 14:50:10 +0200 Subject: [PATCH 2/5] Override insecure when endpoint URL is set (#5944) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When an endpoint is set in both Environment variable with "http" and passed in WithEndpointURL with "https", Insecure is set to true while the endpoint is used from WithEndpointURL. Example - OTEL_EXPORTER_OTLP_ENDPOINT is set to "http://env.endpoint/prefix" - WithEndpointURL is passed "https://someendpoint/somepath" The real endpoint used is "http://someendpoint/somepath", which is actually neither of both. --------- Co-authored-by: Robert Pająk --- CHANGELOG.md | 4 +++ .../otlp/otlplog/otlploggrpc/config_test.go | 30 +++++++++++++++++ exporters/otlp/otlplog/otlploghttp/config.go | 6 +--- .../otlp/otlplog/otlploghttp/config_test.go | 32 +++++++++++++++++++ .../otlpmetricgrpc/internal/oconf/options.go | 4 +-- .../internal/oconf/options_test.go | 28 ++++++++++++++++ .../otlpmetrichttp/internal/oconf/options.go | 4 +-- .../internal/oconf/options_test.go | 28 ++++++++++++++++ .../internal/otlpconfig/options.go | 4 +-- .../internal/otlpconfig/options_test.go | 14 ++++++++ .../internal/otlpconfig/options.go | 4 +-- .../internal/otlpconfig/options_test.go | 14 ++++++++ .../otlp/otlpmetric/oconf/options.go.tmpl | 4 +-- .../otlpmetric/oconf/options_test.go.tmpl | 28 ++++++++++++++++ .../otlp/otlptrace/otlpconfig/options.go.tmpl | 4 +-- .../otlptrace/otlpconfig/options_test.go.tmpl | 14 ++++++++ 16 files changed, 199 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3636e22d58..9fc7aa395a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Global MeterProvider registration unwraps global instrument Observers, the undocumented Unwrap() methods are now private. (#5881) - Fix `go.opentelemetry.io/otel/exporters/prometheus` trying to add exemplars to Gauge metrics, which is unsupported. (#5912) +- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#5944) +- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5944) +- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#5944) +- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5944) ### Changed diff --git a/exporters/otlp/otlplog/otlploggrpc/config_test.go b/exporters/otlp/otlplog/otlploggrpc/config_test.go index 51d864b6282..cb21786b2c4 100644 --- a/exporters/otlp/otlplog/otlploggrpc/config_test.go +++ b/exporters/otlp/otlplog/otlploggrpc/config_test.go @@ -169,6 +169,21 @@ func TestNewConfig(t *testing.T) { retryCfg: newSetting(defaultRetryCfg), }, }, + { + name: "WithEndpointURL secure when Environment Endpoint is set insecure", + envars: map[string]string{ + "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "http://env.endpoint:8080/prefix", + }, + options: []Option{ + WithEndpointURL("https://test:8080/path"), + }, + want: config{ + endpoint: newSetting("test:8080"), + insecure: newSetting(false), + timeout: newSetting(defaultTimeout), + retryCfg: newSetting(defaultRetryCfg), + }, + }, { name: "LogEnvironmentVariables", envars: map[string]string{ @@ -235,6 +250,21 @@ func TestNewConfig(t *testing.T) { retryCfg: newSetting(defaultRetryCfg), }, }, + { + name: "WithEndpointURL secure when Environment insecure is set false", + envars: map[string]string{ + "OTEL_EXPORTER_OTLP_LOGS_INSECURE": "true", + }, + options: []Option{ + WithEndpointURL("https://test:8080/path"), + }, + want: config{ + endpoint: newSetting("test:8080"), + insecure: newSetting(false), + timeout: newSetting(defaultTimeout), + retryCfg: newSetting(defaultRetryCfg), + }, + }, { name: "EnvironmentVariablesPrecedence", envars: map[string]string{ diff --git a/exporters/otlp/otlplog/otlploghttp/config.go b/exporters/otlp/otlplog/otlploghttp/config.go index f348672f466..bfe768091e3 100644 --- a/exporters/otlp/otlplog/otlploghttp/config.go +++ b/exporters/otlp/otlplog/otlploghttp/config.go @@ -183,11 +183,7 @@ func WithEndpointURL(rawURL string) Option { return fnOpt(func(c config) config { c.endpoint = newSetting(u.Host) c.path = newSetting(u.Path) - if u.Scheme != "https" { - c.insecure = newSetting(true) - } else { - c.insecure = newSetting(false) - } + c.insecure = newSetting(u.Scheme != "https") return c }) } diff --git a/exporters/otlp/otlplog/otlploghttp/config_test.go b/exporters/otlp/otlplog/otlploghttp/config_test.go index 456499a5886..1a7568921db 100644 --- a/exporters/otlp/otlplog/otlploghttp/config_test.go +++ b/exporters/otlp/otlplog/otlploghttp/config_test.go @@ -167,6 +167,38 @@ func TestNewConfig(t *testing.T) { retryCfg: newSetting(defaultRetryCfg), }, }, + { + name: "WithEndpointURL secure when Environment Endpoint is set insecure", + envars: map[string]string{ + "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "http://env.endpoint:8080/prefix", + }, + options: []Option{ + WithEndpointURL("https://test:8080/path"), + }, + want: config{ + endpoint: newSetting("test:8080"), + path: newSetting("/path"), + insecure: newSetting(false), + timeout: newSetting(defaultTimeout), + retryCfg: newSetting(defaultRetryCfg), + }, + }, + { + name: "WithEndpointURL secure when Environment insecure is set false", + envars: map[string]string{ + "OTEL_EXPORTER_OTLP_LOGS_INSECURE": "true", + }, + options: []Option{ + WithEndpointURL("https://test:8080/path"), + }, + want: config{ + endpoint: newSetting("test:8080"), + path: newSetting("/path"), + insecure: newSetting(false), + timeout: newSetting(defaultTimeout), + retryCfg: newSetting(defaultRetryCfg), + }, + }, { name: "LogEnvironmentVariables", envars: map[string]string{ diff --git a/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options.go b/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options.go index f66c471212f..c016b4dbe97 100644 --- a/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options.go +++ b/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options.go @@ -287,9 +287,7 @@ func WithEndpointURL(v string) GenericOption { cfg.Metrics.Endpoint = u.Host cfg.Metrics.URLPath = u.Path - if u.Scheme != "https" { - cfg.Metrics.Insecure = true - } + cfg.Metrics.Insecure = u.Scheme != "https" return cfg }) diff --git a/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options_test.go b/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options_test.go index 53092631ea6..41816152733 100644 --- a/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options_test.go +++ b/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf/options_test.go @@ -149,6 +149,34 @@ func TestConfigs(t *testing.T) { assert.Equal(t, "someendpoint", c.Metrics.Endpoint) }, }, + { + name: "Test With WithEndpointURL secure when Environment Endpoint is set insecure", + env: map[string]string{ + "OTEL_EXPORTER_OTLP_ENDPOINT": "http://env.endpoint/prefix", + }, + opts: []GenericOption{ + WithEndpointURL("https://someendpoint/somepath"), + }, + asserts: func(t *testing.T, c *Config, grpcOption bool) { + assert.Equal(t, "someendpoint", c.Metrics.Endpoint) + assert.Equal(t, "/somepath", c.Metrics.URLPath) + assert.False(t, c.Metrics.Insecure) + }, + }, + { + name: "Test With WithEndpointURL secure when Environment insecure is set true", + env: map[string]string{ + "OTEL_EXPORTER_OTLP_INSECURE": "true", + }, + opts: []GenericOption{ + WithEndpointURL("https://someendpoint/somepath"), + }, + asserts: func(t *testing.T, c *Config, grpcOption bool) { + assert.Equal(t, "someendpoint", c.Metrics.Endpoint) + assert.Equal(t, "/somepath", c.Metrics.URLPath) + assert.False(t, c.Metrics.Insecure) + }, + }, { name: "Test Environment Endpoint", env: map[string]string{ diff --git a/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options.go b/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options.go index 9a582cdbbaa..33363193de5 100644 --- a/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options.go +++ b/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options.go @@ -287,9 +287,7 @@ func WithEndpointURL(v string) GenericOption { cfg.Metrics.Endpoint = u.Host cfg.Metrics.URLPath = u.Path - if u.Scheme != "https" { - cfg.Metrics.Insecure = true - } + cfg.Metrics.Insecure = u.Scheme != "https" return cfg }) diff --git a/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options_test.go b/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options_test.go index 0445e3786ab..36858bc3077 100644 --- a/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options_test.go +++ b/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf/options_test.go @@ -149,6 +149,34 @@ func TestConfigs(t *testing.T) { assert.Equal(t, "someendpoint", c.Metrics.Endpoint) }, }, + { + name: "Test With WithEndpointURL secure when Environment Endpoint is set insecure", + env: map[string]string{ + "OTEL_EXPORTER_OTLP_ENDPOINT": "http://env.endpoint/prefix", + }, + opts: []GenericOption{ + WithEndpointURL("https://someendpoint/somepath"), + }, + asserts: func(t *testing.T, c *Config, grpcOption bool) { + assert.Equal(t, "someendpoint", c.Metrics.Endpoint) + assert.Equal(t, "/somepath", c.Metrics.URLPath) + assert.False(t, c.Metrics.Insecure) + }, + }, + { + name: "Test With WithEndpointURL secure when Environment insecure is set true", + env: map[string]string{ + "OTEL_EXPORTER_OTLP_INSECURE": "true", + }, + opts: []GenericOption{ + WithEndpointURL("https://someendpoint/somepath"), + }, + asserts: func(t *testing.T, c *Config, grpcOption bool) { + assert.Equal(t, "someendpoint", c.Metrics.Endpoint) + assert.Equal(t, "/somepath", c.Metrics.URLPath) + assert.False(t, c.Metrics.Insecure) + }, + }, { name: "Test Environment Endpoint", env: map[string]string{ diff --git a/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go b/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go index 8d4b4bf0898..3ee452ef72b 100644 --- a/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go +++ b/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options.go @@ -278,9 +278,7 @@ func WithEndpointURL(v string) GenericOption { cfg.Traces.Endpoint = u.Host cfg.Traces.URLPath = u.Path - if u.Scheme != "https" { - cfg.Traces.Insecure = true - } + cfg.Traces.Insecure = u.Scheme != "https" return cfg }) diff --git a/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options_test.go b/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options_test.go index 56b540a5970..47c984f6cf1 100644 --- a/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options_test.go +++ b/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options_test.go @@ -147,6 +147,20 @@ func TestConfigs(t *testing.T) { assert.Equal(t, "someendpoint", c.Traces.Endpoint) }, }, + { + name: "Test With WithEndpointURL secure when Environment Endpoint is set insecure", + env: map[string]string{ + "OTEL_EXPORTER_OTLP_ENDPOINT": "http://env.endpoint/prefix", + }, + opts: []GenericOption{ + WithEndpointURL("https://someendpoint/somepath"), + }, + asserts: func(t *testing.T, c *Config, grpcOption bool) { + assert.Equal(t, "someendpoint", c.Traces.Endpoint) + assert.Equal(t, "/somepath", c.Traces.URLPath) + assert.False(t, c.Traces.Insecure) + }, + }, { name: "Test Environment Endpoint", env: map[string]string{ diff --git a/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go b/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go index 4cfd6c27f58..131906b1ff3 100644 --- a/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go +++ b/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options.go @@ -278,9 +278,7 @@ func WithEndpointURL(v string) GenericOption { cfg.Traces.Endpoint = u.Host cfg.Traces.URLPath = u.Path - if u.Scheme != "https" { - cfg.Traces.Insecure = true - } + cfg.Traces.Insecure = u.Scheme != "https" return cfg }) diff --git a/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options_test.go b/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options_test.go index 7a09669343d..55a3ad96986 100644 --- a/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options_test.go +++ b/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options_test.go @@ -147,6 +147,20 @@ func TestConfigs(t *testing.T) { assert.Equal(t, "someendpoint", c.Traces.Endpoint) }, }, + { + name: "Test With WithEndpointURL secure when Environment Endpoint is set insecure", + env: map[string]string{ + "OTEL_EXPORTER_OTLP_ENDPOINT": "http://env.endpoint/prefix", + }, + opts: []GenericOption{ + WithEndpointURL("https://someendpoint/somepath"), + }, + asserts: func(t *testing.T, c *Config, grpcOption bool) { + assert.Equal(t, "someendpoint", c.Traces.Endpoint) + assert.Equal(t, "/somepath", c.Traces.URLPath) + assert.False(t, c.Traces.Insecure) + }, + }, { name: "Test Environment Endpoint", env: map[string]string{ diff --git a/internal/shared/otlp/otlpmetric/oconf/options.go.tmpl b/internal/shared/otlp/otlpmetric/oconf/options.go.tmpl index 1f7cc658768..f6a21c6137e 100644 --- a/internal/shared/otlp/otlpmetric/oconf/options.go.tmpl +++ b/internal/shared/otlp/otlpmetric/oconf/options.go.tmpl @@ -287,9 +287,7 @@ func WithEndpointURL(v string) GenericOption { cfg.Metrics.Endpoint = u.Host cfg.Metrics.URLPath = u.Path - if u.Scheme != "https" { - cfg.Metrics.Insecure = true - } + cfg.Metrics.Insecure = u.Scheme != "https" return cfg }) diff --git a/internal/shared/otlp/otlpmetric/oconf/options_test.go.tmpl b/internal/shared/otlp/otlpmetric/oconf/options_test.go.tmpl index 5a136567cb5..9e2862e835d 100644 --- a/internal/shared/otlp/otlpmetric/oconf/options_test.go.tmpl +++ b/internal/shared/otlp/otlpmetric/oconf/options_test.go.tmpl @@ -149,6 +149,34 @@ func TestConfigs(t *testing.T) { assert.Equal(t, "someendpoint", c.Metrics.Endpoint) }, }, + { + name: "Test With WithEndpointURL secure when Environment Endpoint is set insecure", + env: map[string]string{ + "OTEL_EXPORTER_OTLP_ENDPOINT": "http://env.endpoint/prefix", + }, + opts: []GenericOption{ + WithEndpointURL("https://someendpoint/somepath"), + }, + asserts: func(t *testing.T, c *Config, grpcOption bool) { + assert.Equal(t, "someendpoint", c.Metrics.Endpoint) + assert.Equal(t, "/somepath", c.Metrics.URLPath) + assert.False(t, c.Metrics.Insecure) + }, + }, + { + name: "Test With WithEndpointURL secure when Environment insecure is set true", + env: map[string]string{ + "OTEL_EXPORTER_OTLP_INSECURE": "true", + }, + opts: []GenericOption{ + WithEndpointURL("https://someendpoint/somepath"), + }, + asserts: func(t *testing.T, c *Config, grpcOption bool) { + assert.Equal(t, "someendpoint", c.Metrics.Endpoint) + assert.Equal(t, "/somepath", c.Metrics.URLPath) + assert.False(t, c.Metrics.Insecure) + }, + }, { name: "Test Environment Endpoint", env: map[string]string{ diff --git a/internal/shared/otlp/otlptrace/otlpconfig/options.go.tmpl b/internal/shared/otlp/otlptrace/otlpconfig/options.go.tmpl index a7f79c3efb4..e99663f3cfd 100644 --- a/internal/shared/otlp/otlptrace/otlpconfig/options.go.tmpl +++ b/internal/shared/otlp/otlptrace/otlpconfig/options.go.tmpl @@ -278,9 +278,7 @@ func WithEndpointURL(v string) GenericOption { cfg.Traces.Endpoint = u.Host cfg.Traces.URLPath = u.Path - if u.Scheme != "https" { - cfg.Traces.Insecure = true - } + cfg.Traces.Insecure = u.Scheme != "https" return cfg }) diff --git a/internal/shared/otlp/otlptrace/otlpconfig/options_test.go.tmpl b/internal/shared/otlp/otlptrace/otlpconfig/options_test.go.tmpl index 8bbc8a1c974..9170ce71dc7 100644 --- a/internal/shared/otlp/otlptrace/otlpconfig/options_test.go.tmpl +++ b/internal/shared/otlp/otlptrace/otlpconfig/options_test.go.tmpl @@ -147,6 +147,20 @@ func TestConfigs(t *testing.T) { assert.Equal(t, "someendpoint", c.Traces.Endpoint) }, }, + { + name: "Test With WithEndpointURL secure when Environment Endpoint is set insecure", + env: map[string]string{ + "OTEL_EXPORTER_OTLP_ENDPOINT": "http://env.endpoint/prefix", + }, + opts: []GenericOption{ + WithEndpointURL("https://someendpoint/somepath"), + }, + asserts: func(t *testing.T, c *Config, grpcOption bool) { + assert.Equal(t, "someendpoint", c.Traces.Endpoint) + assert.Equal(t, "/somepath", c.Traces.URLPath) + assert.False(t, c.Traces.Insecure) + }, + }, { name: "Test Environment Endpoint", env: map[string]string{ From b89de2df1f0d1f347aca13acbc51f53117ec8721 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:56:54 +0100 Subject: [PATCH 3/5] fix(deps): update module go.opentelemetry.io/build-tools/gotmpl to v0.15.0 (#5949) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/build-tools/gotmpl](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools) | `v0.14.0` -> `v0.15.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fgotmpl/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fgotmpl/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fgotmpl/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fgotmpl/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-build-tools (go.opentelemetry.io/build-tools/gotmpl) ### [`v0.15.0`](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0150) [Compare Source](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.14.0...v0.15.0) ##### 💡 Enhancements 💡 - `all`: bump minimum Go version to 1.22 ([#​605](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/605)) - `multimod`: Improve error message when the Go proxy misbehaves ([#​610](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/610)) ##### 🧰 Bug fixes 🧰 - `chloggen`: Fix bug that directed all output to stderr ([#​612](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/612))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- internal/tools/go.mod | 2 +- internal/tools/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/tools/go.mod b/internal/tools/go.mod index 09a1ad9c1e4..4ece35529af 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -9,7 +9,7 @@ require ( github.com/jcchavezs/porto v0.6.0 github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad go.opentelemetry.io/build-tools/crosslink v0.14.0 - go.opentelemetry.io/build-tools/gotmpl v0.14.0 + go.opentelemetry.io/build-tools/gotmpl v0.15.0 go.opentelemetry.io/build-tools/multimod v0.14.0 go.opentelemetry.io/build-tools/semconvgen v0.14.0 golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c diff --git a/internal/tools/go.sum b/internal/tools/go.sum index c8c0a8af6c0..73f33a1e6fb 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -480,8 +480,8 @@ go.opentelemetry.io/build-tools v0.14.0 h1:fcnriXRUVpnVIFXtdlc1fTn9g+YRxzOV0xhw4 go.opentelemetry.io/build-tools v0.14.0/go.mod h1:pxTqOr0uL/0s9+xnpuKTAhmVFDssF3O4UUUuWKQqThE= go.opentelemetry.io/build-tools/crosslink v0.14.0 h1:yxCsELb3A81W4p8RSDjPSg9WcCTkM3+X+tYUzaaJ3uU= go.opentelemetry.io/build-tools/crosslink v0.14.0/go.mod h1:QJ+E5i4+CCg40jlOYQsfBq4lVe2cKCyhftEXDsqNlhg= -go.opentelemetry.io/build-tools/gotmpl v0.14.0 h1:oCDzQvs78J0r311JZ60lcHmZ6xAK0O4F7gIHN8jeB2A= -go.opentelemetry.io/build-tools/gotmpl v0.14.0/go.mod h1:jO5X6iTySwb3UMbiC380ZgwLPCdKyQwxEraFh4dYYF8= +go.opentelemetry.io/build-tools/gotmpl v0.15.0 h1:bf1oiQpPa1XG51E+zbIzvLlWQ7iTNfcdkXpmQz+znKA= +go.opentelemetry.io/build-tools/gotmpl v0.15.0/go.mod h1:4bZbMtWadnaFALXjBw3Cp2gX5KzY10mWVzaRQR6Aip8= go.opentelemetry.io/build-tools/multimod v0.14.0 h1:AaM06mlSga3IaCj6eM+Kg9tei062qsU6Z+x6ENmfBWI= go.opentelemetry.io/build-tools/multimod v0.14.0/go.mod h1:lY7ZccnZ6dg4uRcghXa4p9v4IDvI9Yf/XFdlpPO84AA= go.opentelemetry.io/build-tools/semconvgen v0.14.0 h1:lOHKG4Tc/mfc6yb0an4hdi9oLbIrf/mUUIF3U8HbM8Q= From 030ffdf4e46a496d0aa4693d488f8b5e534fd9bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:06:14 +0100 Subject: [PATCH 4/5] fix(deps): update module go.opentelemetry.io/build-tools/crosslink to v0.15.0 (#5948) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/build-tools/crosslink](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools) | `v0.14.0` -> `v0.15.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-build-tools (go.opentelemetry.io/build-tools/crosslink) ### [`v0.15.0`](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0150) [Compare Source](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.14.0...v0.15.0) ##### 💡 Enhancements 💡 - `all`: bump minimum Go version to 1.22 ([#​605](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/605)) - `multimod`: Improve error message when the Go proxy misbehaves ([#​610](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/610)) ##### 🧰 Bug fixes 🧰 - `chloggen`: Fix bug that directed all output to stderr ([#​612](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/612))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- internal/tools/go.mod | 4 ++-- internal/tools/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/tools/go.mod b/internal/tools/go.mod index 4ece35529af..e59f3aec80a 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -8,7 +8,7 @@ require ( github.com/golangci/golangci-lint v1.61.0 github.com/jcchavezs/porto v0.6.0 github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad - go.opentelemetry.io/build-tools/crosslink v0.14.0 + go.opentelemetry.io/build-tools/crosslink v0.15.0 go.opentelemetry.io/build-tools/gotmpl v0.15.0 go.opentelemetry.io/build-tools/multimod v0.14.0 go.opentelemetry.io/build-tools/semconvgen v0.14.0 @@ -196,7 +196,7 @@ require ( gitlab.com/bosi/decorder v0.4.2 // indirect go-simpler.org/musttag v0.12.2 // indirect go-simpler.org/sloglint v0.7.2 // indirect - go.opentelemetry.io/build-tools v0.14.0 // indirect + go.opentelemetry.io/build-tools v0.15.0 // indirect go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect diff --git a/internal/tools/go.sum b/internal/tools/go.sum index 73f33a1e6fb..78dc6a6fc02 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -476,10 +476,10 @@ go-simpler.org/musttag v0.12.2 h1:J7lRc2ysXOq7eM8rwaTYnNrHd5JwjppzB6mScysB2Cs= go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S7TYM= go-simpler.org/sloglint v0.7.2 h1:Wc9Em/Zeuu7JYpl+oKoYOsQSy2X560aVueCW/m6IijY= go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3ppuluo= -go.opentelemetry.io/build-tools v0.14.0 h1:fcnriXRUVpnVIFXtdlc1fTn9g+YRxzOV0xhw4nN919c= -go.opentelemetry.io/build-tools v0.14.0/go.mod h1:pxTqOr0uL/0s9+xnpuKTAhmVFDssF3O4UUUuWKQqThE= -go.opentelemetry.io/build-tools/crosslink v0.14.0 h1:yxCsELb3A81W4p8RSDjPSg9WcCTkM3+X+tYUzaaJ3uU= -go.opentelemetry.io/build-tools/crosslink v0.14.0/go.mod h1:QJ+E5i4+CCg40jlOYQsfBq4lVe2cKCyhftEXDsqNlhg= +go.opentelemetry.io/build-tools v0.15.0 h1:SJFD+MSKKrSIP0oujmmY/zRi8TgVFzUc1080nIBmRzA= +go.opentelemetry.io/build-tools v0.15.0/go.mod h1:xyjzzjE7WEtBPVqZ0BwC8RxbGGW3DkD33YFgVLkvOUs= +go.opentelemetry.io/build-tools/crosslink v0.15.0 h1:cGwaVTtYi4wUQrQss8i9qmSoE9x7JXj9ou3JNMIe0nw= +go.opentelemetry.io/build-tools/crosslink v0.15.0/go.mod h1:BB5bv1xmtugy4lL9IWE9zNbpwtRwoFRdM8JmusHs3xw= go.opentelemetry.io/build-tools/gotmpl v0.15.0 h1:bf1oiQpPa1XG51E+zbIzvLlWQ7iTNfcdkXpmQz+znKA= go.opentelemetry.io/build-tools/gotmpl v0.15.0/go.mod h1:4bZbMtWadnaFALXjBw3Cp2gX5KzY10mWVzaRQR6Aip8= go.opentelemetry.io/build-tools/multimod v0.14.0 h1:AaM06mlSga3IaCj6eM+Kg9tei062qsU6Z+x6ENmfBWI= From 7f68356a7def1429099008275e4ce0d3ce7e5067 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:47:57 -0800 Subject: [PATCH 5/5] fix(deps): update module go.opentelemetry.io/build-tools/semconvgen to v0.15.0 (#5953) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/build-tools/semconvgen](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools) | `v0.14.0` -> `v0.15.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
open-telemetry/opentelemetry-go-build-tools (go.opentelemetry.io/build-tools/semconvgen) ### [`v0.15.0`](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0150) [Compare Source](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.14.0...v0.15.0) ##### 💡 Enhancements 💡 - `all`: bump minimum Go version to 1.22 ([#​605](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/605)) - `multimod`: Improve error message when the Go proxy misbehaves ([#​610](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/610)) ##### 🧰 Bug fixes 🧰 - `chloggen`: Fix bug that directed all output to stderr ([#​612](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/612))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- internal/tools/go.mod | 2 +- internal/tools/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/tools/go.mod b/internal/tools/go.mod index e59f3aec80a..479021aef37 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -11,7 +11,7 @@ require ( go.opentelemetry.io/build-tools/crosslink v0.15.0 go.opentelemetry.io/build-tools/gotmpl v0.15.0 go.opentelemetry.io/build-tools/multimod v0.14.0 - go.opentelemetry.io/build-tools/semconvgen v0.14.0 + go.opentelemetry.io/build-tools/semconvgen v0.15.0 golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c golang.org/x/tools v0.26.0 golang.org/x/vuln v1.1.3 diff --git a/internal/tools/go.sum b/internal/tools/go.sum index 78dc6a6fc02..d9059bbd930 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -484,8 +484,8 @@ go.opentelemetry.io/build-tools/gotmpl v0.15.0 h1:bf1oiQpPa1XG51E+zbIzvLlWQ7iTNf go.opentelemetry.io/build-tools/gotmpl v0.15.0/go.mod h1:4bZbMtWadnaFALXjBw3Cp2gX5KzY10mWVzaRQR6Aip8= go.opentelemetry.io/build-tools/multimod v0.14.0 h1:AaM06mlSga3IaCj6eM+Kg9tei062qsU6Z+x6ENmfBWI= go.opentelemetry.io/build-tools/multimod v0.14.0/go.mod h1:lY7ZccnZ6dg4uRcghXa4p9v4IDvI9Yf/XFdlpPO84AA= -go.opentelemetry.io/build-tools/semconvgen v0.14.0 h1:lOHKG4Tc/mfc6yb0an4hdi9oLbIrf/mUUIF3U8HbM8Q= -go.opentelemetry.io/build-tools/semconvgen v0.14.0/go.mod h1:JRu+X6WMMK1fvo9toZM5hb7p6Pug7NXLjbq5J0WcS18= +go.opentelemetry.io/build-tools/semconvgen v0.15.0 h1:awFoVF505l9/GUMM5B88I7LvXzDT/lGseMPaBvwuG/4= +go.opentelemetry.io/build-tools/semconvgen v0.15.0/go.mod h1:y3mUWiLxotg00GNzvROqviVVYaG7TcS9vohrLssqFqk= go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=