diff --git a/.chloggen/add-alias-for-otlphttp-exporter.yaml b/.chloggen/add-alias-for-otlphttp-exporter.yaml new file mode 100644 index 00000000000..5d566d0aba9 --- /dev/null +++ b/.chloggen/add-alias-for-otlphttp-exporter.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: deprecation + +# The name of the component, or a single word describing the area of concern, (e.g. receiver/otlp) +component: exporter/otlp_http + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Rename `otlphttp` exporter to `otlp_http` exporter and add deprecated alias `otlphttp`. + +# One or more tracking issues or pull requests related to the change +issues: [14396] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.chloggen/config.yaml b/.chloggen/config.yaml index 621f2958056..7f3c9ab408e 100644 --- a/.chloggen/config.yaml +++ b/.chloggen/config.yaml @@ -17,7 +17,7 @@ components: - exporter/debug - exporter/nop - exporter/otlp - - exporter/otlphttp + - exporter/otlp_http - extension/memory_limiter - extension/xextension - extension/xextension diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index bba1d2ed876..63d0855c43a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -41,7 +41,7 @@ body: - exporter/exporterhelper/xexporterhelper - exporter/nop - exporter/otlp - - exporter/otlphttp + - exporter/otlp_http - exporter/x - extension/memorylimiter - extension/x diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 2b10eda576f..a30e1609d4c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -35,7 +35,7 @@ body: - exporter/exporterhelper/xexporterhelper - exporter/nop - exporter/otlp - - exporter/otlphttp + - exporter/otlp_http - exporter/x - extension/memorylimiter - extension/x diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index 8ec6a71b6e7..9cfc98f5617 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -34,7 +34,7 @@ body: - exporter/exporterhelper/xexporterhelper - exporter/nop - exporter/otlp - - exporter/otlphttp + - exporter/otlp_http - exporter/x - extension/memorylimiter - extension/x diff --git a/.github/workflows/utils/cspell.json b/.github/workflows/utils/cspell.json index 9fa40cbdbfc..3a7335449e6 100644 --- a/.github/workflows/utils/cspell.json +++ b/.github/workflows/utils/cspell.json @@ -353,6 +353,7 @@ "otelzap", "otlpexporter", "otlpgrpc", + "otlp_http", "otlphttp", "otlphttpexporter", "otlphttpexporter's", diff --git a/component/identifiable_test.go b/component/identifiable_test.go index ace96386bb8..07576944057 100644 --- a/component/identifiable_test.go +++ b/component/identifiable_test.go @@ -236,6 +236,7 @@ func TestNewType(t *testing.T) { {name: "oteltestbedcol"}, {name: "otlp"}, {name: "otlp_encoding"}, + {name: "otlp_http"}, {name: "otlphttp"}, {name: "otlpjsonfile"}, {name: "ottl"}, diff --git a/config/configauth/README.md b/config/configauth/README.md index 25ed0be9c87..b50ebcbaa8d 100644 --- a/config/configauth/README.md +++ b/config/configauth/README.md @@ -59,7 +59,7 @@ receivers: ## oidc is the extension name to use as the authenticator for this receiver authenticator: oidc - otlphttp/withauth: + otlp_http/withauth: endpoint: http://localhost:9000 auth: authenticator: oauth2client diff --git a/config/confighttp/README.md b/config/confighttp/README.md index 0e8bcb0ab8e..068ef9cd467 100644 --- a/config/confighttp/README.md +++ b/config/confighttp/README.md @@ -68,7 +68,7 @@ Example: ```yaml exporter: - otlphttp: + otlp_http: endpoint: otelcol2:55690 auth: authenticator: some-authenticator-extension diff --git a/confmap/provider/yamlprovider/README.md b/confmap/provider/yamlprovider/README.md index abf74e585bc..16f96ee1177 100644 --- a/confmap/provider/yamlprovider/README.md +++ b/confmap/provider/yamlprovider/README.md @@ -22,5 +22,5 @@ The YAML Provider takes a literal YAML string as Collector configuration. The scheme for this provider is `yaml`. Usage looks like the following passed to the Collector's command line invocation: ```text ---config="yaml:exporters::otlphttp::sending_queue::batch::flush_timeout: 2s" +--config="yaml:exporters::otlp_http::sending_queue::batch::flush_timeout: 2s" ``` diff --git a/confmap/provider/yamlprovider/provider.go b/confmap/provider/yamlprovider/provider.go index 8385823abc1..c0e3296a39c 100644 --- a/confmap/provider/yamlprovider/provider.go +++ b/confmap/provider/yamlprovider/provider.go @@ -24,8 +24,8 @@ type provider struct{} // bytes-uri = "yaml:" yaml-bytes // // Examples: -// `yaml:exporters::otlphttp::sending_queue::batch::flush_timeout: 2s` -// `yaml:exporters::otlphttp/foo::sending_queue::batch::flush_timeout: 2s` +// `yaml:exporters::otlp_http::sending_queue::batch::flush_timeout: 2s` +// `yaml:exporters::otlp_http/foo::sending_queue::batch::flush_timeout: 2s` func NewFactory() confmap.ProviderFactory { return confmap.NewProviderFactory(newProvider) } diff --git a/exporter/otlphttpexporter/README.md b/exporter/otlphttpexporter/README.md index c4e1f92200d..f02db80695f 100644 --- a/exporter/otlphttpexporter/README.md +++ b/exporter/otlphttpexporter/README.md @@ -16,10 +16,13 @@ [otlp]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-otlp -Export traces and/or metrics via HTTP using [OTLP]( +The `otlp_http` exporter sends logs, metrics, profiles and traces via HTTP using [OTLP]( https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md) format. +The `otlphttp` deprecated alias exists for the component name. It will be removed in a future version. +If you use the deprecated alias `otlphttp` in your configuration, change it to `otlp_http`. + The following settings are required: - `endpoint` (no default): The target base URL to send data to (e.g.: https://example.com:4318). @@ -48,7 +51,7 @@ Example: ```yaml exporters: - otlphttp: + otlp_http: endpoint: https://example.com:4318 ``` @@ -56,7 +59,7 @@ By default `gzip` compression is enabled. See [compression comparison](../../con ```yaml exporters: - otlphttp: + otlp_http: ... compression: none ``` @@ -65,7 +68,7 @@ By default `proto` encoding is used, to change the content encoding of the messa ```yaml exporters: - otlphttp: + otlp_http: ... encoding: json ``` diff --git a/exporter/otlphttpexporter/factory.go b/exporter/otlphttpexporter/factory.go index b33485b568f..66f8106e4aa 100644 --- a/exporter/otlphttpexporter/factory.go +++ b/exporter/otlphttpexporter/factory.go @@ -28,6 +28,7 @@ func NewFactory() exporter.Factory { return xexporter.NewFactory( metadata.Type, createDefaultConfig, + xexporter.WithDeprecatedTypeAlias(component.MustNewType("otlphttp")), xexporter.WithTraces(createTraces, metadata.TracesStability), xexporter.WithMetrics(createMetrics, metadata.MetricsStability), xexporter.WithLogs(createLogs, metadata.LogsStability), diff --git a/exporter/otlphttpexporter/generated_component_test.go b/exporter/otlphttpexporter/generated_component_test.go index ef3b0f47f29..7ee862097dd 100644 --- a/exporter/otlphttpexporter/generated_component_test.go +++ b/exporter/otlphttpexporter/generated_component_test.go @@ -20,7 +20,7 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" ) -var typ = component.MustNewType("otlphttp") +var typ = component.MustNewType("otlp_http") func TestComponentFactoryType(t *testing.T) { require.Equal(t, typ, NewFactory().Type()) diff --git a/exporter/otlphttpexporter/internal/metadata/generated_status.go b/exporter/otlphttpexporter/internal/metadata/generated_status.go index f16f032244b..498f2332d89 100644 --- a/exporter/otlphttpexporter/internal/metadata/generated_status.go +++ b/exporter/otlphttpexporter/internal/metadata/generated_status.go @@ -7,7 +7,7 @@ import ( ) var ( - Type = component.MustNewType("otlphttp") + Type = component.MustNewType("otlp_http") ScopeName = "go.opentelemetry.io/collector/exporter/otlphttpexporter" ) diff --git a/exporter/otlphttpexporter/metadata.yaml b/exporter/otlphttpexporter/metadata.yaml index da2e8615b38..344e20a3b64 100644 --- a/exporter/otlphttpexporter/metadata.yaml +++ b/exporter/otlphttpexporter/metadata.yaml @@ -1,4 +1,4 @@ -type: otlphttp +type: otlp_http github_project: open-telemetry/opentelemetry-collector status: diff --git a/exporter/otlphttpexporter/testdata/bad_empty_config.yaml b/exporter/otlphttpexporter/testdata/bad_empty_config.yaml index c52b900bbe9..f77e33a72f0 100644 --- a/exporter/otlphttpexporter/testdata/bad_empty_config.yaml +++ b/exporter/otlphttpexporter/testdata/bad_empty_config.yaml @@ -5,11 +5,11 @@ processors: nop: exporters: - otlphttp: + otlp_http: service: pipelines: traces: receivers: [nop] processors: [nop] - exporters: [otlphttp] + exporters: [otlp_http] diff --git a/internal/e2e/error_propagation_test.go b/internal/e2e/error_propagation_test.go index 0991334a43d..03f0f96b8f8 100644 --- a/internal/e2e/error_propagation_test.go +++ b/internal/e2e/error_propagation_test.go @@ -208,7 +208,7 @@ func createHTTPExporter(t *testing.T, code int) consumer.Logs { cfg.RetryConfig.Enabled = false cfg.Encoding = otlphttpexporter.EncodingProto cfg.LogsEndpoint = srv.URL + "/v1/logs" - e, err := f.CreateLogs(context.Background(), exportertest.NewNopSettings(component.MustNewType("otlphttp")), cfg) + e, err := f.CreateLogs(context.Background(), exportertest.NewNopSettings(component.MustNewType("otlp_http")), cfg) require.NoError(t, err) err = e.Start(context.Background(), componenttest.NewNopHost()) require.NoError(t, err) diff --git a/reports/distributions/contrib.yaml b/reports/distributions/contrib.yaml index 975550e1bdb..a616a6e1659 100644 --- a/reports/distributions/contrib.yaml +++ b/reports/distributions/contrib.yaml @@ -8,7 +8,7 @@ components: - debug - nop - otlp - - otlphttp + - otlp_http extension: - zpages pkg: diff --git a/reports/distributions/core.yaml b/reports/distributions/core.yaml index 109424b7dec..45fcc90a525 100644 --- a/reports/distributions/core.yaml +++ b/reports/distributions/core.yaml @@ -8,7 +8,7 @@ components: - debug - nop - otlp - - otlphttp + - otlp_http extension: - zpages pkg: diff --git a/reports/distributions/k8s.yaml b/reports/distributions/k8s.yaml index 7b784401244..c1b162c2284 100644 --- a/reports/distributions/k8s.yaml +++ b/reports/distributions/k8s.yaml @@ -8,7 +8,7 @@ components: - debug - nop - otlp - - otlphttp + - otlp_http extension: - zpages processor: diff --git a/reports/distributions/otlp.yaml b/reports/distributions/otlp.yaml index 1f62a8063d6..24293aded8c 100644 --- a/reports/distributions/otlp.yaml +++ b/reports/distributions/otlp.yaml @@ -4,6 +4,6 @@ maintainers: [] components: exporter: - otlp - - otlphttp + - otlp_http receiver: - otlp diff --git a/service/README.md b/service/README.md index 68d0ddb16a2..c15b5754f07 100644 --- a/service/README.md +++ b/service/README.md @@ -137,7 +137,7 @@ processors: - memory_limiter exporters: - otlp - - otlphttp + - otlp_http - debug extensions: - zpages