From f9d44de9b6360683aa1009d47aff5ae8ccd51b74 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 3 Oct 2024 03:47:39 -0600 Subject: [PATCH 01/14] [exporter/logging] Remove logging exporter (#11037) #### Description It is September, which means we get to remove this deprecated component. - The helm chart was updated to exclude the logging exporter already: https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/UPGRADING.md#0840-to-0850. - The Operator references have been updated: https://github.com/open-telemetry/opentelemetry-operator/pull/3259. - Opentelemetry.io site final references to update: https://github.com/open-telemetry/opentelemetry.io/pull/5143 #### Link to tracking issue Related to https://github.com/open-telemetry/opentelemetry-collector/issues/7769 --- .chloggen/remove-logging-exporter.yaml | 25 +++ Makefile | 2 - cmd/builder/internal/config/default.yaml | 1 - cmd/builder/test/core.builder.yaml | 1 - cmd/otelcorecol/builder-config.yaml | 2 - cmd/otelcorecol/components.go | 3 - cmd/otelcorecol/go.mod | 3 - component/config_test.go | 1 - connector/forwardconnector/README.md | 2 +- exporter/debugexporter/README.md | 2 +- exporter/debugexporter/config.go | 4 +- exporter/debugexporter/exporter.go | 4 - exporter/loggingexporter/Makefile | 1 - exporter/loggingexporter/README.md | 52 ----- exporter/loggingexporter/config.go | 94 --------- exporter/loggingexporter/config_test.go | 181 ------------------ exporter/loggingexporter/doc.go | 7 - exporter/loggingexporter/factory.go | 80 -------- exporter/loggingexporter/factory_test.go | 49 ----- .../generated_component_test.go | 151 --------------- .../loggingexporter/generated_package_test.go | 13 -- exporter/loggingexporter/go.mod | 100 ---------- exporter/loggingexporter/go.sum | 110 ----------- .../internal/metadata/generated_status.go | 18 -- exporter/loggingexporter/metadata.yaml | 8 - .../testdata/config_loglevel.yaml | 3 - .../testdata/config_loglevel_typo.yaml | 2 - .../testdata/config_verbosity.yaml | 3 - .../testdata/invalid_verbosity_loglevel.yaml | 2 - .../testdata/loglevel_info.yaml | 1 - otelcol/internal/configunmarshaler/configs.go | 4 + .../configunmarshaler/configs_test.go | 12 ++ versions.yaml | 1 - 33 files changed, 45 insertions(+), 897 deletions(-) create mode 100644 .chloggen/remove-logging-exporter.yaml delete mode 100644 exporter/loggingexporter/Makefile delete mode 100644 exporter/loggingexporter/README.md delete mode 100644 exporter/loggingexporter/config.go delete mode 100644 exporter/loggingexporter/config_test.go delete mode 100644 exporter/loggingexporter/doc.go delete mode 100644 exporter/loggingexporter/factory.go delete mode 100644 exporter/loggingexporter/factory_test.go delete mode 100644 exporter/loggingexporter/generated_component_test.go delete mode 100644 exporter/loggingexporter/generated_package_test.go delete mode 100644 exporter/loggingexporter/go.mod delete mode 100644 exporter/loggingexporter/go.sum delete mode 100644 exporter/loggingexporter/internal/metadata/generated_status.go delete mode 100644 exporter/loggingexporter/metadata.yaml delete mode 100644 exporter/loggingexporter/testdata/config_loglevel.yaml delete mode 100644 exporter/loggingexporter/testdata/config_loglevel_typo.yaml delete mode 100644 exporter/loggingexporter/testdata/config_verbosity.yaml delete mode 100644 exporter/loggingexporter/testdata/invalid_verbosity_loglevel.yaml delete mode 100644 exporter/loggingexporter/testdata/loglevel_info.yaml diff --git a/.chloggen/remove-logging-exporter.yaml b/.chloggen/remove-logging-exporter.yaml new file mode 100644 index 00000000000..9de89981bf1 --- /dev/null +++ b/.chloggen/remove-logging-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: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: loggingexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Removed the deprecated logging exporter. Use the debug exporter instead. + +# One or more tracking issues or pull requests related to the change +issues: [11037] + +# (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/Makefile b/Makefile index 404c97632a9..62f1e6c0d36 100644 --- a/Makefile +++ b/Makefile @@ -292,7 +292,6 @@ check-contrib: -replace go.opentelemetry.io/collector/exporter=$(CURDIR)/exporter \ -replace go.opentelemetry.io/collector/exporter/debugexporter=$(CURDIR)/exporter/debugexporter \ -replace go.opentelemetry.io/collector/exporter/exporterprofiles=$(CURDIR)/exporter/exporterprofiles \ - -replace go.opentelemetry.io/collector/exporter/loggingexporter=$(CURDIR)/exporter/loggingexporter \ -replace go.opentelemetry.io/collector/exporter/nopexporter=$(CURDIR)/exporter/nopexporter \ -replace go.opentelemetry.io/collector/exporter/otlpexporter=$(CURDIR)/exporter/otlpexporter \ -replace go.opentelemetry.io/collector/exporter/otlphttpexporter=$(CURDIR)/exporter/otlphttpexporter \ @@ -363,7 +362,6 @@ restore-contrib: -dropreplace go.opentelemetry.io/collector/consumer/consumertest \ -dropreplace go.opentelemetry.io/collector/exporter \ -dropreplace go.opentelemetry.io/collector/exporter/debugexporter \ - -dropreplace go.opentelemetry.io/collector/exporter/loggingexporter \ -dropreplace go.opentelemetry.io/collector/exporter/nopexporter \ -dropreplace go.opentelemetry.io/collector/exporter/otlpexporter \ -dropreplace go.opentelemetry.io/collector/exporter/otlphttpexporter \ diff --git a/cmd/builder/internal/config/default.yaml b/cmd/builder/internal/config/default.yaml index d7b7a011acd..3e3f2483d70 100644 --- a/cmd/builder/internal/config/default.yaml +++ b/cmd/builder/internal/config/default.yaml @@ -18,7 +18,6 @@ receivers: - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0 exporters: - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.110.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.110.0 - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.110.0 - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.110.0 - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.110.0 diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index e6aab6c3c6b..b9b7b03166b 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -40,7 +40,6 @@ replaces: - go.opentelemetry.io/collector/connector/connectorprofiles => ${WORKSPACE_DIR}/connector/connectorprofiles - go.opentelemetry.io/collector/exporter => ${WORKSPACE_DIR}/exporter - go.opentelemetry.io/collector/exporter/debugexporter => ${WORKSPACE_DIR}/exporter/debugexporter - - go.opentelemetry.io/collector/exporter/loggingexporter => ${WORKSPACE_DIR}/exporter/loggingexporter - go.opentelemetry.io/collector/exporter/exporterprofiles => ${WORKSPACE_DIR}/exporter/exporterprofiles - go.opentelemetry.io/collector/extension => ${WORKSPACE_DIR}/extension - go.opentelemetry.io/collector/extension/auth => ${WORKSPACE_DIR}/extension/auth diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index e3f58c89e34..defb0612a0c 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -18,7 +18,6 @@ receivers: - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0 exporters: - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.110.0 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.110.0 - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.110.0 - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.110.0 - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.110.0 @@ -72,7 +71,6 @@ replaces: - go.opentelemetry.io/collector/exporter => ../../exporter - go.opentelemetry.io/collector/exporter/debugexporter => ../../exporter/debugexporter - go.opentelemetry.io/collector/exporter/exporterprofiles => ../../exporter/exporterprofiles - - go.opentelemetry.io/collector/exporter/loggingexporter => ../../exporter/loggingexporter - go.opentelemetry.io/collector/exporter/nopexporter => ../../exporter/nopexporter - go.opentelemetry.io/collector/exporter/otlpexporter => ../../exporter/otlpexporter - go.opentelemetry.io/collector/exporter/otlphttpexporter => ../../exporter/otlphttpexporter diff --git a/cmd/otelcorecol/components.go b/cmd/otelcorecol/components.go index aa0858060ef..c5901f2beef 100644 --- a/cmd/otelcorecol/components.go +++ b/cmd/otelcorecol/components.go @@ -8,7 +8,6 @@ import ( forwardconnector "go.opentelemetry.io/collector/connector/forwardconnector" "go.opentelemetry.io/collector/exporter" debugexporter "go.opentelemetry.io/collector/exporter/debugexporter" - loggingexporter "go.opentelemetry.io/collector/exporter/loggingexporter" nopexporter "go.opentelemetry.io/collector/exporter/nopexporter" otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter" otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter" @@ -52,7 +51,6 @@ func components() (otelcol.Factories, error) { factories.Exporters, err = exporter.MakeFactoryMap( debugexporter.NewFactory(), - loggingexporter.NewFactory(), nopexporter.NewFactory(), otlpexporter.NewFactory(), otlphttpexporter.NewFactory(), @@ -62,7 +60,6 @@ func components() (otelcol.Factories, error) { } factories.ExporterModules = make(map[component.Type]string, len(factories.Exporters)) factories.ExporterModules[debugexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/debugexporter v0.110.0" - factories.ExporterModules[loggingexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/loggingexporter v0.110.0" factories.ExporterModules[nopexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/nopexporter v0.110.0" factories.ExporterModules[otlpexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/otlpexporter v0.110.0" factories.ExporterModules[otlphttpexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/otlphttpexporter v0.110.0" diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index 947852a287f..61b81db4e04 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -18,7 +18,6 @@ require ( go.opentelemetry.io/collector/connector/forwardconnector v0.110.0 go.opentelemetry.io/collector/exporter v0.110.0 go.opentelemetry.io/collector/exporter/debugexporter v0.110.0 - go.opentelemetry.io/collector/exporter/loggingexporter v0.110.0 go.opentelemetry.io/collector/exporter/nopexporter v0.110.0 go.opentelemetry.io/collector/exporter/otlpexporter v0.110.0 go.opentelemetry.io/collector/exporter/otlphttpexporter v0.110.0 @@ -214,8 +213,6 @@ replace go.opentelemetry.io/collector/exporter/debugexporter => ../../exporter/d replace go.opentelemetry.io/collector/exporter/exporterprofiles => ../../exporter/exporterprofiles -replace go.opentelemetry.io/collector/exporter/loggingexporter => ../../exporter/loggingexporter - replace go.opentelemetry.io/collector/exporter/nopexporter => ../../exporter/nopexporter replace go.opentelemetry.io/collector/exporter/otlpexporter => ../../exporter/otlpexporter diff --git a/component/config_test.go b/component/config_test.go index afdbc61b06e..9e6daa0f618 100644 --- a/component/config_test.go +++ b/component/config_test.go @@ -306,7 +306,6 @@ func TestNewType(t *testing.T) { {name: "kinetica"}, {name: "kubeletstats"}, {name: "loadbalancing"}, - {name: "logging"}, {name: "logicmonitor"}, {name: "logstransform"}, {name: "logzio"}, diff --git a/connector/forwardconnector/README.md b/connector/forwardconnector/README.md index bf71e5785d8..413b87a7464 100644 --- a/connector/forwardconnector/README.md +++ b/connector/forwardconnector/README.md @@ -129,7 +129,7 @@ service: # - forward # traces/log: # receivers: [forward] - # exporters: [logging] + # exporters: [debug] ``` [Connectors README]:../README.md diff --git a/exporter/debugexporter/README.md b/exporter/debugexporter/README.md index 9b581eea46f..d9cb1304b39 100644 --- a/exporter/debugexporter/README.md +++ b/exporter/debugexporter/README.md @@ -24,7 +24,7 @@ See also the [Troubleshooting][troubleshooting_docs] document for examples on us The following settings are optional: -- `verbosity` (default = `basic`): the verbosity of the logging export +- `verbosity` (default = `basic`): the verbosity of the debug exporter (detailed|normal|basic). When set to `detailed`, pipeline data is verbosely logged. - `sampling_initial` (default = `2`): number of messages initially logged each diff --git a/exporter/debugexporter/config.go b/exporter/debugexporter/config.go index 2ebd85e78ab..3ddf8434dfa 100644 --- a/exporter/debugexporter/config.go +++ b/exporter/debugexporter/config.go @@ -20,9 +20,9 @@ var ( } ) -// Config defines configuration for logging exporter. +// Config defines configuration for debug exporter. type Config struct { - // Verbosity defines the logging exporter verbosity. + // Verbosity defines the debug exporter verbosity. Verbosity configtelemetry.Level `mapstructure:"verbosity,omitempty"` // SamplingInitial defines how many samples are initially logged during each second. diff --git a/exporter/debugexporter/exporter.go b/exporter/debugexporter/exporter.go index 324cd19935c..2df9edf7a6f 100644 --- a/exporter/debugexporter/exporter.go +++ b/exporter/debugexporter/exporter.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// NOTE: If you are making changes to this file, consider whether you want to make similar changes -// to the Logging exporter in /exporter/internal/common/logging_exporter.go, which has similar logic. -// This is especially important for security issues. - package debugexporter // import "go.opentelemetry.io/collector/exporter/debugexporter" import ( diff --git a/exporter/loggingexporter/Makefile b/exporter/loggingexporter/Makefile deleted file mode 100644 index ded7a36092d..00000000000 --- a/exporter/loggingexporter/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../Makefile.Common diff --git a/exporter/loggingexporter/README.md b/exporter/loggingexporter/README.md deleted file mode 100644 index 685e1264e28..00000000000 --- a/exporter/loggingexporter/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# Logging Exporter - - -| Status | | -| ------------- |-----------| -| Stability | [deprecated]: traces, metrics, logs | -| Distributions | [core], [contrib] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Flogging%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Flogging) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Flogging%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Flogging) | - -[deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated -[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib - - -This exporter is being deprecated in favour of the [debug exporter]. It will be removed in September 2024. - -Exports data to the console via zap.Logger. - -Supported pipeline types: traces, metrics, logs - -## Getting Started - -The following settings are optional: - -- `loglevel` (default = `info`): the log level of the logging export - (debug|info|warn|error). When set to `debug`, pipeline data is verbosely - logged. - - **Note**: This option has been deprecated in favor of `verbosity` -- `verbosity` (default = `normal`): the verbosity of the logging export - (detailed|normal|basic). When set to `detailed`, pipeline data is verbosely - logged. -- `sampling_initial` (default = `2`): number of messages initially logged each - second. -- `sampling_thereafter` (default = `500`): sampling rate after the initial - messages are logged (every Mth message is logged). Refer to [Zap - docs](https://godoc.org/go.uber.org/zap/zapcore#NewSampler) for more details - on how sampling parameters impact number of messages. - -### Note -`loglevel` is deprecated, use `verbosity` instead. - -Example: - -```yaml -exporters: - logging: - verbosity: detailed - sampling_initial: 5 - sampling_thereafter: 200 -``` - -[debug exporter]: ../debugexporter/README.md diff --git a/exporter/loggingexporter/config.go b/exporter/loggingexporter/config.go deleted file mode 100644 index d35cdd6fa4d..00000000000 --- a/exporter/loggingexporter/config.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package loggingexporter // import "go.opentelemetry.io/collector/exporter/loggingexporter" - -import ( - "fmt" - - "go.uber.org/zap/zapcore" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/confmap" -) - -var ( - // supportedLevels in this exporter's configuration. - // configtelemetry.LevelNone and other future values are not supported. - supportedLevels map[configtelemetry.Level]struct{} = map[configtelemetry.Level]struct{}{ - configtelemetry.LevelBasic: {}, - configtelemetry.LevelNormal: {}, - configtelemetry.LevelDetailed: {}, - } -) - -// Config defines configuration for logging exporter. -type Config struct { - // LogLevel defines log level of the logging exporter; options are debug, info, warn, error. - // Deprecated: Use `Verbosity` instead. - LogLevel zapcore.Level `mapstructure:"loglevel,omitempty"` - - // Verbosity defines the logging exporter verbosity. - Verbosity configtelemetry.Level `mapstructure:"verbosity,omitempty"` - - // SamplingInitial defines how many samples are initially logged during each second. - SamplingInitial int `mapstructure:"sampling_initial"` - - // SamplingThereafter defines the sampling rate after the initial samples are logged. - SamplingThereafter int `mapstructure:"sampling_thereafter"` - - // warnLogLevel is set on unmarshaling to warn users about `loglevel` usage. - warnLogLevel bool -} - -var _ component.Config = (*Config)(nil) -var _ confmap.Unmarshaler = (*Config)(nil) - -func mapLevel(level zapcore.Level) (configtelemetry.Level, error) { - switch level { - case zapcore.DebugLevel: - return configtelemetry.LevelDetailed, nil - case zapcore.InfoLevel: - return configtelemetry.LevelNormal, nil - case zapcore.WarnLevel, zapcore.ErrorLevel, - zapcore.DPanicLevel, zapcore.PanicLevel, zapcore.FatalLevel: - // Anything above info is mapped to 'basic' level. - return configtelemetry.LevelBasic, nil - default: - return configtelemetry.LevelNone, fmt.Errorf("log level %q is not supported", level) - } -} - -func (cfg *Config) Unmarshal(conf *confmap.Conf) error { - if conf.IsSet("loglevel") && conf.IsSet("verbosity") { - return fmt.Errorf("'loglevel' and 'verbosity' are incompatible. Use only 'verbosity' instead") - } - - if err := conf.Unmarshal(cfg); err != nil { - return err - } - - if conf.IsSet("loglevel") { - verbosity, err := mapLevel(cfg.LogLevel) - if err != nil { - return fmt.Errorf("failed to map 'loglevel': %w", err) - } - - // 'verbosity' is unset but 'loglevel' is set. - // Override default verbosity. - cfg.Verbosity = verbosity - cfg.warnLogLevel = true - } - - return nil -} - -// Validate checks if the exporter configuration is valid -func (cfg *Config) Validate() error { - if _, ok := supportedLevels[cfg.Verbosity]; !ok { - return fmt.Errorf("verbosity level %q is not supported", cfg.Verbosity) - } - - return nil -} diff --git a/exporter/loggingexporter/config_test.go b/exporter/loggingexporter/config_test.go deleted file mode 100644 index 6280113f981..00000000000 --- a/exporter/loggingexporter/config_test.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package loggingexporter - -import ( - "path/filepath" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" - - "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/confmap/confmaptest" -) - -func TestUnmarshalDefaultConfig(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - require.NoError(t, confmap.New().Unmarshal(&cfg)) - assert.Equal(t, factory.CreateDefaultConfig(), cfg) -} - -func TestUnmarshalConfig(t *testing.T) { - tests := []struct { - filename string - cfg *Config - expectedErr string - }{ - { - filename: "config_loglevel.yaml", - cfg: &Config{ - LogLevel: zapcore.DebugLevel, - Verbosity: configtelemetry.LevelDetailed, - SamplingInitial: 10, - SamplingThereafter: 50, - warnLogLevel: true, - }, - }, - { - filename: "config_verbosity.yaml", - cfg: &Config{ - LogLevel: zapcore.InfoLevel, - Verbosity: configtelemetry.LevelDetailed, - SamplingInitial: 10, - SamplingThereafter: 50, - }, - }, - { - filename: "loglevel_info.yaml", - cfg: &Config{ - LogLevel: zapcore.InfoLevel, - Verbosity: configtelemetry.LevelNormal, - SamplingInitial: 2, - SamplingThereafter: 500, - warnLogLevel: true, - }, - }, - { - filename: "invalid_verbosity_loglevel.yaml", - expectedErr: "'loglevel' and 'verbosity' are incompatible. Use only 'verbosity' instead", - }, - { - filename: "config_loglevel_typo.yaml", - expectedErr: "'' has invalid keys: logLevel", - }, - } - - for _, tt := range tests { - t.Run(tt.filename, func(t *testing.T) { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", tt.filename)) - require.NoError(t, err) - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - err = cm.Unmarshal(&cfg) - if tt.expectedErr != "" { - assert.ErrorContains(t, err, tt.expectedErr) - } else { - require.NoError(t, err) - assert.Equal(t, tt.cfg, cfg) - } - }) - } -} - -func Test_UnmarshalMarshalled(t *testing.T) { - for name, tc := range map[string]struct { - inCfg *Config - expectedConfig *Config - expectedErr string - }{ - "Base": { - inCfg: &Config{}, - expectedConfig: &Config{}, - }, - "VerbositySpecified": { - inCfg: &Config{ - Verbosity: configtelemetry.LevelDetailed, - }, - expectedConfig: &Config{ - Verbosity: configtelemetry.LevelDetailed, - }, - }, - "LogLevelSpecified": { - inCfg: &Config{ - LogLevel: zapcore.DebugLevel, - }, - expectedConfig: &Config{ - LogLevel: zapcore.DebugLevel, - Verbosity: configtelemetry.LevelDetailed, - warnLogLevel: true, - }, - }, - "SpecifiedLogLevelExpectedErr": { - inCfg: &Config{ - // Cannot specify both log level and verbosity so an error is expected - LogLevel: zapcore.DebugLevel, - Verbosity: configtelemetry.LevelNormal, - }, - expectedErr: "'loglevel' and 'verbosity' are incompatible. Use only 'verbosity' instead", - }, - } { - t.Run(name, func(t *testing.T) { - - conf := confmap.New() - err := conf.Marshal(tc.inCfg) - require.NoError(t, err) - - raw := conf.ToStringMap() - - conf = confmap.NewFromStringMap(raw) - - outCfg := &Config{} - - err = conf.Unmarshal(outCfg) - - if tc.expectedErr == "" { - require.NoError(t, err) - assert.Equal(t, tc.expectedConfig, outCfg) - return - } - require.Error(t, err) - assert.EqualError(t, err, tc.expectedErr) - }) - } -} - -func TestValidate(t *testing.T) { - tests := []struct { - name string - cfg *Config - expectedErr string - }{ - { - name: "verbosity none", - cfg: &Config{ - Verbosity: configtelemetry.LevelNone, - }, - expectedErr: "verbosity level \"None\" is not supported", - }, - { - name: "verbosity detailed", - cfg: &Config{ - Verbosity: configtelemetry.LevelDetailed, - }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - err := tt.cfg.Validate() - if tt.expectedErr != "" { - assert.EqualError(t, err, tt.expectedErr) - } else { - assert.NoError(t, err) - } - }) - } -} diff --git a/exporter/loggingexporter/doc.go b/exporter/loggingexporter/doc.go deleted file mode 100644 index 3a5c01850d9..00000000000 --- a/exporter/loggingexporter/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate mdatagen metadata.yaml - -// Package loggingexporter exports data to console as logs. -package loggingexporter // import "go.opentelemetry.io/collector/exporter/loggingexporter" diff --git a/exporter/loggingexporter/factory.go b/exporter/loggingexporter/factory.go deleted file mode 100644 index c19d7e16ac6..00000000000 --- a/exporter/loggingexporter/factory.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package loggingexporter // import "go.opentelemetry.io/collector/exporter/loggingexporter" - -import ( - "context" - - "go.uber.org/zap/zapcore" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/internal/common" - "go.opentelemetry.io/collector/exporter/loggingexporter/internal/metadata" -) - -// The value of "type" key in configuration. -var componentType = component.MustNewType("logging") - -const ( - defaultSamplingInitial = 2 - defaultSamplingThereafter = 500 -) - -// NewFactory creates a factory for Logging exporter -func NewFactory() exporter.Factory { - return exporter.NewFactory( - componentType, - createDefaultConfig, - exporter.WithTraces(createTracesExporter, metadata.TracesStability), - exporter.WithMetrics(createMetricsExporter, metadata.MetricsStability), - exporter.WithLogs(createLogsExporter, metadata.LogsStability), - ) -} - -func createDefaultConfig() component.Config { - return &Config{ - LogLevel: zapcore.InfoLevel, - Verbosity: configtelemetry.LevelNormal, - SamplingInitial: defaultSamplingInitial, - SamplingThereafter: defaultSamplingThereafter, - } -} - -func createTracesExporter(ctx context.Context, set exporter.Settings, config component.Config) (exporter.Traces, error) { - set.TelemetrySettings.Logger.Warn("The logging exporter is DEPRECATED and will be REMOVED in v0.111.0. Use the debug exporter instead: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/debugexporter") - cfg := config.(*Config) - return common.CreateTracesExporter(ctx, set, config, &common.Common{ - Verbosity: cfg.Verbosity, - WarnLogLevel: cfg.warnLogLevel, - LogLevel: cfg.LogLevel, - SamplingInitial: cfg.SamplingInitial, - SamplingThereafter: cfg.SamplingThereafter, - }) -} - -func createMetricsExporter(ctx context.Context, set exporter.Settings, config component.Config) (exporter.Metrics, error) { - set.TelemetrySettings.Logger.Warn("The logging exporter is DEPRECATED and will be REMOVED in v0.111.0. Use the debug exporter instead: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/debugexporter") - cfg := config.(*Config) - return common.CreateMetricsExporter(ctx, set, config, &common.Common{ - Verbosity: cfg.Verbosity, - WarnLogLevel: cfg.warnLogLevel, - LogLevel: cfg.LogLevel, - SamplingInitial: cfg.SamplingInitial, - SamplingThereafter: cfg.SamplingThereafter, - }) -} - -func createLogsExporter(ctx context.Context, set exporter.Settings, config component.Config) (exporter.Logs, error) { - set.TelemetrySettings.Logger.Warn("The logging exporter is DEPRECATED and will be REMOVED in v0.111.0. Use the debug exporter instead: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/debugexporter") - cfg := config.(*Config) - return common.CreateLogsExporter(ctx, set, config, &common.Common{ - Verbosity: cfg.Verbosity, - WarnLogLevel: cfg.warnLogLevel, - LogLevel: cfg.LogLevel, - SamplingInitial: cfg.SamplingInitial, - SamplingThereafter: cfg.SamplingThereafter, - }) -} diff --git a/exporter/loggingexporter/factory_test.go b/exporter/loggingexporter/factory_test.go deleted file mode 100644 index 2b35acddf3c..00000000000 --- a/exporter/loggingexporter/factory_test.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package loggingexporter - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/exporter/exportertest" -) - -func TestCreateDefaultConfig(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - assert.NotNil(t, cfg, "failed to create default config") - assert.NoError(t, componenttest.CheckConfigStruct(cfg)) -} - -func TestCreateMetricsExporter(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - - me, err := factory.CreateMetricsExporter(context.Background(), exportertest.NewNopSettings(), cfg) - require.NoError(t, err) - assert.NotNil(t, me) -} - -func TestCreateTracesExporter(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - - te, err := factory.CreateTracesExporter(context.Background(), exportertest.NewNopSettings(), cfg) - require.NoError(t, err) - assert.NotNil(t, te) -} - -func TestCreateLogsExporter(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - - te, err := factory.CreateLogsExporter(context.Background(), exportertest.NewNopSettings(), cfg) - require.NoError(t, err) - assert.NotNil(t, te) -} diff --git a/exporter/loggingexporter/generated_component_test.go b/exporter/loggingexporter/generated_component_test.go deleted file mode 100644 index be058ef46c5..00000000000 --- a/exporter/loggingexporter/generated_component_test.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package loggingexporter - -import ( - "context" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/confmap/confmaptest" - "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/plog" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.opentelemetry.io/collector/pdata/ptrace" -) - -func TestComponentFactoryType(t *testing.T) { - require.Equal(t, "logging", NewFactory().Type().String()) -} - -func TestComponentConfigStruct(t *testing.T) { - require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) -} - -func TestComponentLifecycle(t *testing.T) { - factory := NewFactory() - - tests := []struct { - name string - createFn func(ctx context.Context, set exporter.Settings, cfg component.Config) (component.Component, error) - }{ - - { - name: "logs", - createFn: func(ctx context.Context, set exporter.Settings, cfg component.Config) (component.Component, error) { - return factory.CreateLogsExporter(ctx, set, cfg) - }, - }, - - { - name: "metrics", - createFn: func(ctx context.Context, set exporter.Settings, cfg component.Config) (component.Component, error) { - return factory.CreateMetricsExporter(ctx, set, cfg) - }, - }, - - { - name: "traces", - createFn: func(ctx context.Context, set exporter.Settings, cfg component.Config) (component.Component, error) { - return factory.CreateTracesExporter(ctx, set, cfg) - }, - }, - } - - cm, err := confmaptest.LoadConf("metadata.yaml") - require.NoError(t, err) - cfg := factory.CreateDefaultConfig() - sub, err := cm.Sub("tests::config") - require.NoError(t, err) - require.NoError(t, sub.Unmarshal(&cfg)) - - for _, tt := range tests { - t.Run(tt.name+"-shutdown", func(t *testing.T) { - c, err := tt.createFn(context.Background(), exportertest.NewNopSettings(), cfg) - require.NoError(t, err) - err = c.Shutdown(context.Background()) - require.NoError(t, err) - }) - t.Run(tt.name+"-lifecycle", func(t *testing.T) { - c, err := tt.createFn(context.Background(), exportertest.NewNopSettings(), cfg) - require.NoError(t, err) - host := componenttest.NewNopHost() - err = c.Start(context.Background(), host) - require.NoError(t, err) - require.NotPanics(t, func() { - switch tt.name { - case "logs": - e, ok := c.(exporter.Logs) - require.True(t, ok) - logs := generateLifecycleTestLogs() - if !e.Capabilities().MutatesData { - logs.MarkReadOnly() - } - err = e.ConsumeLogs(context.Background(), logs) - case "metrics": - e, ok := c.(exporter.Metrics) - require.True(t, ok) - metrics := generateLifecycleTestMetrics() - if !e.Capabilities().MutatesData { - metrics.MarkReadOnly() - } - err = e.ConsumeMetrics(context.Background(), metrics) - case "traces": - e, ok := c.(exporter.Traces) - require.True(t, ok) - traces := generateLifecycleTestTraces() - if !e.Capabilities().MutatesData { - traces.MarkReadOnly() - } - err = e.ConsumeTraces(context.Background(), traces) - } - }) - - require.NoError(t, err) - - err = c.Shutdown(context.Background()) - require.NoError(t, err) - }) - } -} - -func generateLifecycleTestLogs() plog.Logs { - logs := plog.NewLogs() - rl := logs.ResourceLogs().AppendEmpty() - rl.Resource().Attributes().PutStr("resource", "R1") - l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() - l.Body().SetStr("test log message") - l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) - return logs -} - -func generateLifecycleTestMetrics() pmetric.Metrics { - metrics := pmetric.NewMetrics() - rm := metrics.ResourceMetrics().AppendEmpty() - rm.Resource().Attributes().PutStr("resource", "R1") - m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() - m.SetName("test_metric") - dp := m.SetEmptyGauge().DataPoints().AppendEmpty() - dp.Attributes().PutStr("test_attr", "value_1") - dp.SetIntValue(123) - dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) - return metrics -} - -func generateLifecycleTestTraces() ptrace.Traces { - traces := ptrace.NewTraces() - rs := traces.ResourceSpans().AppendEmpty() - rs.Resource().Attributes().PutStr("resource", "R1") - span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() - span.Attributes().PutStr("test_attr", "value_1") - span.SetName("test_span") - span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) - span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) - return traces -} diff --git a/exporter/loggingexporter/generated_package_test.go b/exporter/loggingexporter/generated_package_test.go deleted file mode 100644 index 14eb697fde5..00000000000 --- a/exporter/loggingexporter/generated_package_test.go +++ /dev/null @@ -1,13 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package loggingexporter - -import ( - "testing" - - "go.uber.org/goleak" -) - -func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) -} diff --git a/exporter/loggingexporter/go.mod b/exporter/loggingexporter/go.mod deleted file mode 100644 index 49e11a93fd9..00000000000 --- a/exporter/loggingexporter/go.mod +++ /dev/null @@ -1,100 +0,0 @@ -// Deprecated: loggingexporter is deprecated in favour of the debugexporter. It will be removed in September 2024. -module go.opentelemetry.io/collector/exporter/loggingexporter - -go 1.22.0 - -require ( - github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.uber.org/goleak v1.3.0 - go.uber.org/zap v1.27.0 -) - -require ( - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-viper/mapstructure/v2 v2.1.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/knadh/koanf/maps v0.1.1 // indirect - github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.1 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configretry v1.16.0 // indirect - go.opentelemetry.io/collector/consumer v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/extension v0.110.0 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect - go.opentelemetry.io/collector/receiver v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect - go.opentelemetry.io/otel v1.30.0 // indirect - go.opentelemetry.io/otel/metric v1.30.0 // indirect - go.opentelemetry.io/otel/sdk v1.30.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.30.0 // indirect - go.opentelemetry.io/otel/trace v1.30.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/text v0.17.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect - google.golang.org/grpc v1.67.1 // indirect - google.golang.org/protobuf v1.34.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -replace go.opentelemetry.io/collector/component => ../../component - -replace go.opentelemetry.io/collector/confmap => ../../confmap - -replace go.opentelemetry.io/collector/consumer => ../../consumer - -replace go.opentelemetry.io/collector/exporter => ../ - -replace go.opentelemetry.io/collector/extension => ../../extension - -replace go.opentelemetry.io/collector/extension/experimental/storage => ../../extension/experimental/storage - -replace go.opentelemetry.io/collector/pdata => ../../pdata - -replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata - -replace go.opentelemetry.io/collector/receiver => ../../receiver - -retract ( - v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1 - v0.69.0 // Release failed, use v0.69.1 -) - -replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry - -replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry - -replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile - -replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles - -replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest - -replace go.opentelemetry.io/collector/receiver/receiverprofiles => ../../receiver/receiverprofiles - -replace go.opentelemetry.io/collector/exporter/exporterprofiles => ../exporterprofiles - -replace go.opentelemetry.io/collector/pipeline => ../../pipeline - -replace go.opentelemetry.io/collector/internal/globalsignal => ../../internal/globalsignal diff --git a/exporter/loggingexporter/go.sum b/exporter/loggingexporter/go.sum deleted file mode 100644 index 0c99067a705..00000000000 --- a/exporter/loggingexporter/go.sum +++ /dev/null @@ -1,110 +0,0 @@ -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -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.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/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/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= -github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -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/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= -github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= -github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= -github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= -github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -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/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -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= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= -go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= -go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= -go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= -go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= -go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= -go.opentelemetry.io/otel/sdk/metric v1.30.0 h1:QJLT8Pe11jyHBHfSAgYH7kEmT24eX792jZO1bo4BXkM= -go.opentelemetry.io/otel/sdk/metric v1.30.0/go.mod h1:waS6P3YqFNzeP01kuo/MBBYqaoBJl7efRQHOaydhy1Y= -go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= -go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= -go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd h1:6TEm2ZxXoQmFWFlt1vNxvVOa1Q0dXFQD1m/rYjXmS0E= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -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/exporter/loggingexporter/internal/metadata/generated_status.go b/exporter/loggingexporter/internal/metadata/generated_status.go deleted file mode 100644 index 7c415b23aae..00000000000 --- a/exporter/loggingexporter/internal/metadata/generated_status.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -var ( - Type = component.MustNewType("logging") - ScopeName = "go.opentelemetry.io/collector/exporter/loggingexporter" -) - -const ( - TracesStability = component.StabilityLevelDeprecated - MetricsStability = component.StabilityLevelDeprecated - LogsStability = component.StabilityLevelDeprecated -) diff --git a/exporter/loggingexporter/metadata.yaml b/exporter/loggingexporter/metadata.yaml deleted file mode 100644 index 135c1749611..00000000000 --- a/exporter/loggingexporter/metadata.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: logging -github_project: open-telemetry/opentelemetry-collector - -status: - class: exporter - stability: - deprecated: [traces, metrics, logs] - distributions: [core, contrib] diff --git a/exporter/loggingexporter/testdata/config_loglevel.yaml b/exporter/loggingexporter/testdata/config_loglevel.yaml deleted file mode 100644 index ffe8a0df593..00000000000 --- a/exporter/loggingexporter/testdata/config_loglevel.yaml +++ /dev/null @@ -1,3 +0,0 @@ -loglevel: debug -sampling_initial: 10 -sampling_thereafter: 50 diff --git a/exporter/loggingexporter/testdata/config_loglevel_typo.yaml b/exporter/loggingexporter/testdata/config_loglevel_typo.yaml deleted file mode 100644 index 59222127eb7..00000000000 --- a/exporter/loggingexporter/testdata/config_loglevel_typo.yaml +++ /dev/null @@ -1,2 +0,0 @@ -# Typo in the configuration that assumes that this property is camelcase -logLevel: debug diff --git a/exporter/loggingexporter/testdata/config_verbosity.yaml b/exporter/loggingexporter/testdata/config_verbosity.yaml deleted file mode 100644 index 4ea62997627..00000000000 --- a/exporter/loggingexporter/testdata/config_verbosity.yaml +++ /dev/null @@ -1,3 +0,0 @@ -verbosity: detailed -sampling_initial: 10 -sampling_thereafter: 50 diff --git a/exporter/loggingexporter/testdata/invalid_verbosity_loglevel.yaml b/exporter/loggingexporter/testdata/invalid_verbosity_loglevel.yaml deleted file mode 100644 index 37f8f16b24f..00000000000 --- a/exporter/loggingexporter/testdata/invalid_verbosity_loglevel.yaml +++ /dev/null @@ -1,2 +0,0 @@ -loglevel: info -verbosity: detailed diff --git a/exporter/loggingexporter/testdata/loglevel_info.yaml b/exporter/loggingexporter/testdata/loglevel_info.yaml deleted file mode 100644 index 63506faefb4..00000000000 --- a/exporter/loggingexporter/testdata/loglevel_info.yaml +++ /dev/null @@ -1 +0,0 @@ -loglevel: info diff --git a/otelcol/internal/configunmarshaler/configs.go b/otelcol/internal/configunmarshaler/configs.go index 341c6fcad9d..e60ab5d29b4 100644 --- a/otelcol/internal/configunmarshaler/configs.go +++ b/otelcol/internal/configunmarshaler/configs.go @@ -4,6 +4,7 @@ package configunmarshaler // import "go.opentelemetry.io/collector/otelcol/internal/configunmarshaler" import ( + "errors" "fmt" "golang.org/x/exp/maps" @@ -64,6 +65,9 @@ func (c *Configs[F]) Configs() map[component.ID]component.Config { } func errorUnknownType(id component.ID, factories []component.Type) error { + if id.Type().String() == "logging" { + return errors.New("the logging exporter has been deprecated, use the debug exporter instead") + } return fmt.Errorf("unknown type: %q for id: %q (valid values: %v)", id.Type(), id, factories) } diff --git a/otelcol/internal/configunmarshaler/configs_test.go b/otelcol/internal/configunmarshaler/configs_test.go index c9cbdd9dba2..efbf97194b0 100644 --- a/otelcol/internal/configunmarshaler/configs_test.go +++ b/otelcol/internal/configunmarshaler/configs_test.go @@ -142,3 +142,15 @@ func TestUnmarshalError(t *testing.T) { }) } } + +func TestUnmarshal_LoggingExporter(t *testing.T) { + conf := confmap.NewFromStringMap(map[string]any{ + "logging": nil, + }) + factories := map[component.Type]component.Factory{ + nopType: exportertest.NewNopFactory(), + } + cfgs := NewConfigs(factories) + err := cfgs.Unmarshal(conf) + assert.ErrorContains(t, err, "the logging exporter has been deprecated, use the debug exporter instead") +} diff --git a/versions.yaml b/versions.yaml index 07b55e355a2..0ea5a162060 100644 --- a/versions.yaml +++ b/versions.yaml @@ -45,7 +45,6 @@ module-sets: - go.opentelemetry.io/collector/exporter - go.opentelemetry.io/collector/exporter/debugexporter - go.opentelemetry.io/collector/exporter/exporterprofiles - - go.opentelemetry.io/collector/exporter/loggingexporter - go.opentelemetry.io/collector/exporter/nopexporter - go.opentelemetry.io/collector/exporter/otlpexporter - go.opentelemetry.io/collector/exporter/otlphttpexporter From 2d25853c5f186585c626b183c7f169c4527d853d Mon Sep 17 00:00:00 2001 From: Damien Mathieu <42@dmathieu.com> Date: Thu, 3 Oct 2024 16:54:55 +0200 Subject: [PATCH 02/14] Use slices of pointers in pprofile (#11339) #### Description All these slices of values have a potential to store large amounts of data, and should therefore be slices of pointers. #### Link to tracking issue Fixes #11281 cc @mx-psi @bogdandrutu --- .chloggen/pprofile-slice-ptrs.yaml | 20 ++ .../cmd/pdatagen/internal/pprofile_package.go | 18 +- .../v1experimental/pprofextended.pb.go | 242 +++++++++--------- .../pprofile/generated_attributeunitslice.go | 34 ++- .../generated_attributeunitslice_test.go | 27 +- pdata/pprofile/generated_functionslice.go | 34 ++- .../pprofile/generated_functionslice_test.go | 27 +- pdata/pprofile/generated_labelslice.go | 34 ++- pdata/pprofile/generated_labelslice_test.go | 27 +- pdata/pprofile/generated_lineslice.go | 34 ++- pdata/pprofile/generated_lineslice_test.go | 27 +- pdata/pprofile/generated_linkslice.go | 34 ++- pdata/pprofile/generated_linkslice_test.go | 27 +- pdata/pprofile/generated_locationslice.go | 34 ++- .../pprofile/generated_locationslice_test.go | 27 +- pdata/pprofile/generated_mappingslice.go | 34 ++- pdata/pprofile/generated_mappingslice_test.go | 27 +- pdata/pprofile/generated_sampleslice.go | 34 ++- pdata/pprofile/generated_sampleslice_test.go | 27 +- pdata/pprofile/generated_valuetypeslice.go | 34 ++- .../pprofile/generated_valuetypeslice_test.go | 27 +- pdata/pprofile/profiles_test.go | 2 +- proto_patch.sed | 27 -- 23 files changed, 574 insertions(+), 284 deletions(-) create mode 100644 .chloggen/pprofile-slice-ptrs.yaml diff --git a/.chloggen/pprofile-slice-ptrs.yaml b/.chloggen/pprofile-slice-ptrs.yaml new file mode 100644 index 00000000000..5c4fcb8eb94 --- /dev/null +++ b/.chloggen/pprofile-slice-ptrs.yaml @@ -0,0 +1,20 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'breaking' + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: pdata/pprofile + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Replace slices of values to slices of pointers for the `Mapping`, `Location`, `Line`, `Function`, `AttributeUnit`, `Link`, `Value`, `Sample` and `Labels` attributes. + +# One or more tracking issues or pull requests related to the change +issues: [11339] + +# 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: [api] diff --git a/pdata/internal/cmd/pdatagen/internal/pprofile_package.go b/pdata/internal/cmd/pdatagen/internal/pprofile_package.go index 875410c9e51..2e740137749 100644 --- a/pdata/internal/cmd/pdatagen/internal/pprofile_package.go +++ b/pdata/internal/cmd/pdatagen/internal/pprofile_package.go @@ -230,7 +230,7 @@ var profile = &messageValueStruct{ }, } -var valueTypeSlice = &sliceOfValues{ +var valueTypeSlice = &sliceOfPtrs{ structName: "ValueTypeSlice", element: valueType, } @@ -261,7 +261,7 @@ var valueType = &messageValueStruct{ }, } -var sampleSlice = &sliceOfValues{ +var sampleSlice = &sliceOfPtrs{ structName: "SampleSlice", element: sample, } @@ -318,7 +318,7 @@ var sample = &messageValueStruct{ }, } -var labelSlice = &sliceOfValues{ +var labelSlice = &sliceOfPtrs{ structName: "LabelSlice", element: label, } @@ -355,7 +355,7 @@ var label = &messageValueStruct{ }, } -var mappingSlice = &sliceOfValues{ +var mappingSlice = &sliceOfPtrs{ structName: "MappingSlice", element: mapping, } @@ -441,7 +441,7 @@ var mapping = &messageValueStruct{ }, } -var locationSlice = &sliceOfValues{ +var locationSlice = &sliceOfPtrs{ structName: "LocationSlice", element: location, } @@ -492,7 +492,7 @@ var location = &messageValueStruct{ }, } -var lineSlice = &sliceOfValues{ +var lineSlice = &sliceOfPtrs{ structName: "LineSlice", element: line, } @@ -523,7 +523,7 @@ var line = &messageValueStruct{ }, } -var functionSlice = &sliceOfValues{ +var functionSlice = &sliceOfPtrs{ structName: "FunctionSlice", element: function, } @@ -567,7 +567,7 @@ var function = &messageValueStruct{ }, } -var attributeUnitSlice = &sliceOfValues{ +var attributeUnitSlice = &sliceOfPtrs{ structName: "AttributeUnitSlice", element: attributeUnit, } @@ -592,7 +592,7 @@ var attributeUnit = &messageValueStruct{ }, } -var linkSlice = &sliceOfValues{ +var linkSlice = &sliceOfPtrs{ structName: "LinkSlice", element: link, } diff --git a/pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go b/pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go index 64c91b3221e..7b90b35373f 100644 --- a/pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go +++ b/pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go @@ -157,24 +157,24 @@ type Profile struct { // If one of the values represents the number of events represented // by the sample, by convention it should be at index 0 and use // sample_type.unit == "count". - SampleType []ValueType `protobuf:"bytes,1,rep,name=sample_type,json=sampleType,proto3" json:"sample_type"` + SampleType []*ValueType `protobuf:"bytes,1,rep,name=sample_type,json=sampleType,proto3" json:"sample_type,omitempty"` // The set of samples recorded in this profile. - Sample []Sample `protobuf:"bytes,2,rep,name=sample,proto3" json:"sample"` + Sample []*Sample `protobuf:"bytes,2,rep,name=sample,proto3" json:"sample,omitempty"` // Mapping from address ranges to the image/binary/library mapped // into that address range. mapping[0] will be the main binary. - Mapping []Mapping `protobuf:"bytes,3,rep,name=mapping,proto3" json:"mapping"` + Mapping []*Mapping `protobuf:"bytes,3,rep,name=mapping,proto3" json:"mapping,omitempty"` // Locations referenced by samples via location_indices. - Location []Location `protobuf:"bytes,4,rep,name=location,proto3" json:"location"` + Location []*Location `protobuf:"bytes,4,rep,name=location,proto3" json:"location,omitempty"` // Array of locations referenced by samples. LocationIndices []int64 `protobuf:"varint,15,rep,packed,name=location_indices,json=locationIndices,proto3" json:"location_indices,omitempty"` // Functions referenced by locations. - Function []Function `protobuf:"bytes,5,rep,name=function,proto3" json:"function"` + Function []*Function `protobuf:"bytes,5,rep,name=function,proto3" json:"function,omitempty"` // Lookup table for attributes. AttributeTable []v1.KeyValue `protobuf:"bytes,16,rep,name=attribute_table,json=attributeTable,proto3" json:"attribute_table"` // Represents a mapping between Attribute Keys and Units. - AttributeUnits []AttributeUnit `protobuf:"bytes,17,rep,name=attribute_units,json=attributeUnits,proto3" json:"attribute_units"` + AttributeUnits []*AttributeUnit `protobuf:"bytes,17,rep,name=attribute_units,json=attributeUnits,proto3" json:"attribute_units,omitempty"` // Lookup table for links. - LinkTable []Link `protobuf:"bytes,18,rep,name=link_table,json=linkTable,proto3" json:"link_table"` + LinkTable []*Link `protobuf:"bytes,18,rep,name=link_table,json=linkTable,proto3" json:"link_table,omitempty"` // A common table for strings referenced by various messages. // string_table[0] must always be "". StringTable []string `protobuf:"bytes,6,rep,name=string_table,json=stringTable,proto3" json:"string_table,omitempty"` @@ -237,28 +237,28 @@ func (m *Profile) XXX_DiscardUnknown() { var xxx_messageInfo_Profile proto.InternalMessageInfo -func (m *Profile) GetSampleType() []ValueType { +func (m *Profile) GetSampleType() []*ValueType { if m != nil { return m.SampleType } return nil } -func (m *Profile) GetSample() []Sample { +func (m *Profile) GetSample() []*Sample { if m != nil { return m.Sample } return nil } -func (m *Profile) GetMapping() []Mapping { +func (m *Profile) GetMapping() []*Mapping { if m != nil { return m.Mapping } return nil } -func (m *Profile) GetLocation() []Location { +func (m *Profile) GetLocation() []*Location { if m != nil { return m.Location } @@ -272,7 +272,7 @@ func (m *Profile) GetLocationIndices() []int64 { return nil } -func (m *Profile) GetFunction() []Function { +func (m *Profile) GetFunction() []*Function { if m != nil { return m.Function } @@ -286,14 +286,14 @@ func (m *Profile) GetAttributeTable() []v1.KeyValue { return nil } -func (m *Profile) GetAttributeUnits() []AttributeUnit { +func (m *Profile) GetAttributeUnits() []*AttributeUnit { if m != nil { return m.AttributeUnits } return nil } -func (m *Profile) GetLinkTable() []Link { +func (m *Profile) GetLinkTable() []*Link { if m != nil { return m.LinkTable } @@ -554,7 +554,7 @@ type Sample struct { // discouraged case is having a string label and a numeric label of the same // name on a sample. Again, possible to express, but should not be used. // [deprecated, superseded by attributes] - Label []Label `protobuf:"bytes,3,rep,name=label,proto3" json:"label"` + Label []*Label `protobuf:"bytes,3,rep,name=label,proto3" json:"label,omitempty"` // References to attributes in Profile.attribute_table. [optional] Attributes []uint64 `protobuf:"varint,10,rep,packed,name=attributes,proto3" json:"attributes,omitempty"` // Reference to link in Profile.link_table. [optional] @@ -632,7 +632,7 @@ func (m *Sample) GetValue() []int64 { return nil } -func (m *Sample) GetLabel() []Label { +func (m *Sample) GetLabel() []*Label { if m != nil { return m.Label } @@ -907,7 +907,7 @@ type Location struct { // E.g., if memcpy() is inlined into printf: // line[0].function_name == "memcpy" // line[1].function_name == "printf" - Line []Line `protobuf:"bytes,4,rep,name=line,proto3" json:"line"` + Line []*Line `protobuf:"bytes,4,rep,name=line,proto3" json:"line,omitempty"` // Provides an indication that multiple symbols map to this location's // address, for example due to identical code folding by the linker. In that // case the line information above represents one of the multiple @@ -974,7 +974,7 @@ func (m *Location) GetAddress() uint64 { return 0 } -func (m *Location) GetLine() []Line { +func (m *Location) GetLine() []*Line { if m != nil { return m.Line } @@ -1170,100 +1170,100 @@ func init() { } var fileDescriptor_05f9ce3fdbeb046f = []byte{ - // 1483 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcd, 0x4f, 0x1b, 0x47, - 0x1b, 0xc7, 0x1f, 0xf8, 0xe3, 0x31, 0x06, 0x33, 0xe1, 0xe5, 0xdd, 0x37, 0xaf, 0x02, 0xc4, 0xa8, - 0x0d, 0x25, 0x92, 0x29, 0xa4, 0xad, 0xd2, 0xaa, 0x52, 0x6b, 0x82, 0x49, 0x56, 0x38, 0x86, 0x2e, - 0x86, 0x96, 0x2a, 0xd1, 0x6a, 0xf1, 0x0e, 0x66, 0xc4, 0xee, 0xec, 0x6a, 0x77, 0x8c, 0xb0, 0xd4, - 0x53, 0x8f, 0x51, 0x0f, 0x3d, 0xf7, 0x4f, 0xe8, 0xad, 0x7f, 0x41, 0xaf, 0x39, 0xe6, 0x52, 0xa9, - 0xea, 0x21, 0xaa, 0x92, 0xbf, 0xa1, 0xf7, 0x6a, 0x9e, 0x99, 0xb5, 0xcd, 0x47, 0x0e, 0x6e, 0x2f, - 0x68, 0x9e, 0xdf, 0xfc, 0xe6, 0x37, 0xcf, 0xec, 0xf3, 0x65, 0xe0, 0x8b, 0x20, 0xa4, 0x5c, 0x50, - 0x8f, 0xfa, 0x54, 0x44, 0xfd, 0xb5, 0x30, 0x0a, 0x44, 0x20, 0xff, 0x9e, 0x30, 0x8f, 0xc6, 0x6b, - 0xe7, 0xeb, 0xf4, 0x22, 0xa4, 0x11, 0xf3, 0x29, 0x17, 0x8e, 0xb7, 0x16, 0xca, 0x0d, 0x7a, 0x21, - 0x28, 0x77, 0xa9, 0x5b, 0x43, 0x2e, 0xb9, 0x7f, 0x49, 0x40, 0x81, 0xb5, 0x44, 0xa0, 0x76, 0x59, - 0xe0, 0xf6, 0x5c, 0x37, 0xe8, 0x06, 0xea, 0x0e, 0xb9, 0x52, 0xec, 0xdb, 0xab, 0x37, 0xf9, 0xd0, - 0x09, 0x7c, 0x3f, 0xe0, 0x6b, 0xe7, 0xeb, 0x7a, 0xa5, 0xb8, 0xd5, 0xbf, 0x0a, 0x90, 0xdf, 0x53, - 0xea, 0xe4, 0x39, 0x94, 0x62, 0xc7, 0x0f, 0x3d, 0x6a, 0x8b, 0x7e, 0x48, 0x8d, 0xd4, 0x52, 0x66, - 0xa5, 0xb4, 0xf1, 0x49, 0x6d, 0x0c, 0x87, 0x6a, 0x87, 0x8e, 0xd7, 0xa3, 0xed, 0x7e, 0x48, 0x37, - 0xb3, 0x2f, 0x5f, 0x2f, 0x4e, 0x58, 0xa0, 0x04, 0x25, 0x42, 0xbe, 0x82, 0x9c, 0xb2, 0x8c, 0x34, - 0x2a, 0x3f, 0x18, 0x4b, 0x79, 0x1f, 0x8f, 0x6a, 0x59, 0x2d, 0x44, 0xda, 0x90, 0xf7, 0x9d, 0x30, - 0x64, 0xbc, 0x6b, 0x64, 0x50, 0xf3, 0xa3, 0xb1, 0x34, 0x9f, 0xaa, 0xb3, 0x5a, 0x34, 0x91, 0x22, - 0x5f, 0x43, 0xc1, 0x0b, 0x3a, 0x8e, 0x60, 0x01, 0x37, 0xb2, 0x28, 0xfb, 0xf1, 0x58, 0xb2, 0x4d, - 0x7d, 0x58, 0xeb, 0x0e, 0xc4, 0xc8, 0x07, 0x50, 0x49, 0xd6, 0x36, 0xe3, 0x2e, 0xeb, 0xd0, 0xd8, - 0x98, 0x59, 0xca, 0xac, 0x64, 0xac, 0x99, 0x04, 0x37, 0x15, 0x2c, 0x7d, 0x38, 0xe9, 0xf1, 0x0e, - 0xfa, 0x30, 0xf9, 0x0f, 0x7c, 0xd8, 0xd6, 0x87, 0x13, 0x1f, 0x12, 0x31, 0x72, 0x08, 0x33, 0x8e, - 0x10, 0x11, 0x3b, 0xee, 0x09, 0x6a, 0x0b, 0xe7, 0xd8, 0xa3, 0x46, 0x05, 0xf5, 0xef, 0xdd, 0xa8, - 0xaf, 0x93, 0xe5, 0x7c, 0xbd, 0xb6, 0x43, 0xfb, 0x18, 0x5d, 0xad, 0x38, 0x3d, 0x50, 0x69, 0x4b, - 0x11, 0xc2, 0x46, 0x75, 0x7b, 0x9c, 0x89, 0xd8, 0x98, 0x45, 0xdd, 0xcf, 0xc6, 0xf2, 0xbb, 0x9e, - 0x68, 0x1c, 0x70, 0x26, 0xae, 0x5d, 0x25, 0xc1, 0x98, 0x1c, 0x02, 0x78, 0x8c, 0x9f, 0x69, 0xef, - 0x09, 0xde, 0xb2, 0x3e, 0x5e, 0x84, 0x18, 0x3f, 0xd3, 0xe2, 0x45, 0x29, 0xa5, 0x9e, 0x70, 0x17, - 0xa6, 0x62, 0x11, 0x31, 0xde, 0xd5, 0xca, 0xb9, 0xa5, 0xcc, 0x4a, 0xd1, 0x2a, 0x29, 0x4c, 0x51, - 0x16, 0xa1, 0xe4, 0x46, 0x41, 0x68, 0x9f, 0x44, 0x8e, 0x4f, 0x63, 0x23, 0xbf, 0x94, 0x5a, 0xc9, - 0x58, 0x20, 0xa1, 0x6d, 0x44, 0x24, 0xe1, 0x8c, 0xd2, 0x01, 0xa1, 0xa0, 0x08, 0x12, 0xd2, 0x84, - 0x3b, 0x00, 0x82, 0xf9, 0xd4, 0xe6, 0x0e, 0x0f, 0x62, 0xa3, 0x88, 0xfb, 0x45, 0x89, 0xb4, 0x24, - 0x40, 0xde, 0x83, 0x69, 0xb7, 0x17, 0xa9, 0x14, 0x51, 0x14, 0x40, 0x4a, 0x39, 0x41, 0x15, 0xed, - 0x39, 0x94, 0xe4, 0x73, 0x02, 0x57, 0x95, 0x6a, 0x69, 0x29, 0xf5, 0xef, 0x4b, 0x55, 0x09, 0x62, - 0xa9, 0xce, 0x43, 0x4e, 0x59, 0xc6, 0x14, 0xde, 0xae, 0x2d, 0x62, 0x40, 0x5e, 0x26, 0x04, 0xe5, - 0xc2, 0x28, 0x63, 0xde, 0x26, 0x26, 0xa9, 0xc1, 0x2d, 0x97, 0x9e, 0x38, 0x3d, 0x4f, 0xd8, 0xa3, - 0x3d, 0x64, 0x1a, 0x8f, 0xcf, 0xea, 0xad, 0xfd, 0x41, 0x33, 0xa8, 0x3e, 0x81, 0xf2, 0xa5, 0x50, - 0x93, 0x65, 0x28, 0x0f, 0xf3, 0xe7, 0x8c, 0xf6, 0x8d, 0x14, 0x1e, 0x9d, 0x1a, 0x80, 0x3b, 0xb4, - 0x4f, 0x08, 0x64, 0x65, 0x6a, 0x19, 0x69, 0xdc, 0xc3, 0x75, 0xf5, 0xd7, 0x14, 0x64, 0x65, 0x3c, - 0xc9, 0x33, 0x28, 0x88, 0xc8, 0xe9, 0x50, 0x9b, 0xb9, 0x78, 0x78, 0x6a, 0xb3, 0x2e, 0x1f, 0xf6, - 0xc7, 0xeb, 0xc5, 0x4f, 0xbb, 0xc1, 0x95, 0x4f, 0xc3, 0x64, 0x43, 0xf4, 0x3c, 0xda, 0x11, 0x41, - 0xb4, 0x16, 0xba, 0x8e, 0x70, 0xd6, 0x18, 0x17, 0x34, 0xe2, 0x8e, 0xb7, 0x26, 0xad, 0x5a, 0x5b, - 0x2a, 0x99, 0x5b, 0x56, 0x1e, 0x25, 0x4d, 0x97, 0x1c, 0x41, 0x3e, 0x0e, 0x1d, 0x2e, 0xc5, 0xd3, - 0x28, 0xfe, 0xa5, 0x16, 0x7f, 0x38, 0xbe, 0xf8, 0x7e, 0xe8, 0x70, 0x73, 0xcb, 0xca, 0x49, 0x41, - 0xd3, 0xad, 0xfe, 0x92, 0x82, 0xe2, 0x20, 0x1a, 0xf2, 0x8d, 0xba, 0xfd, 0xe2, 0x1b, 0x85, 0xc6, - 0xae, 0xbe, 0x9b, 0x7c, 0x07, 0xff, 0x75, 0xba, 0xdd, 0x88, 0x76, 0x55, 0xb2, 0x08, 0xea, 0x87, - 0x41, 0xe4, 0x78, 0x4c, 0xf4, 0x8d, 0xcc, 0x52, 0x6a, 0x65, 0x7a, 0xe3, 0xd1, 0x78, 0x85, 0x37, - 0xd4, 0x6a, 0x0f, 0xa5, 0xac, 0x79, 0xe7, 0x46, 0xbc, 0xfa, 0x22, 0x03, 0x39, 0x15, 0x4e, 0x99, - 0xb2, 0xa3, 0x5d, 0x8d, 0x5e, 0xe0, 0xe4, 0xc8, 0x5a, 0xe5, 0x91, 0x9e, 0x46, 0x2f, 0xc8, 0x06, - 0xfc, 0x27, 0x01, 0x62, 0x3b, 0x16, 0x4e, 0x24, 0x34, 0x5b, 0x16, 0x51, 0xd6, 0xba, 0x35, 0xd8, - 0xdc, 0x97, 0x7b, 0xea, 0xcc, 0x48, 0xc3, 0x8c, 0x6d, 0x8f, 0xf2, 0xae, 0x38, 0xc5, 0x92, 0xca, - 0x0e, 0x1b, 0x66, 0xdc, 0x44, 0x58, 0x26, 0x60, 0x2c, 0x9c, 0xce, 0x59, 0x92, 0x02, 0x5a, 0x5c, - 0x16, 0x58, 0xd9, 0x9a, 0x1d, 0x6e, 0x99, 0xae, 0x92, 0x9e, 0x83, 0xc9, 0x73, 0xf9, 0xcd, 0x71, - 0x18, 0x65, 0x2c, 0x65, 0x90, 0x16, 0x4c, 0x7a, 0xce, 0x31, 0xf5, 0xf4, 0x38, 0xd9, 0x18, 0xaf, - 0xab, 0xc8, 0x93, 0xba, 0x9a, 0x94, 0x0c, 0x59, 0x00, 0x18, 0x24, 0xb0, 0x2c, 0x65, 0xf9, 0x5d, - 0x46, 0x10, 0x19, 0x58, 0xd9, 0x7f, 0xb0, 0xcc, 0xb2, 0x16, 0xae, 0xc9, 0x87, 0x30, 0x27, 0xfb, - 0x41, 0x2c, 0x1c, 0x3f, 0x8c, 0x65, 0x2b, 0xbd, 0xc0, 0x4e, 0x80, 0x15, 0x97, 0xb5, 0xc8, 0x70, - 0xef, 0x80, 0xb3, 0x0b, 0xd9, 0x0e, 0xaa, 0xdf, 0xc0, 0x24, 0xde, 0x4d, 0x2a, 0x90, 0x19, 0x96, - 0x8e, 0x5c, 0x4a, 0x24, 0x16, 0x91, 0x4e, 0x1c, 0xb9, 0x94, 0x08, 0xef, 0xf9, 0x98, 0x23, 0x19, - 0x4b, 0x2e, 0xc9, 0xff, 0xa0, 0xc0, 0x7b, 0x3e, 0x36, 0x6d, 0x23, 0x8b, 0x70, 0x9e, 0xf7, 0x7c, - 0x59, 0x95, 0xd5, 0xdf, 0x32, 0x90, 0xd7, 0x53, 0x92, 0x4c, 0x43, 0x5a, 0x57, 0x56, 0xd6, 0x4a, - 0x33, 0x57, 0xb6, 0x4b, 0x9f, 0xfa, 0x41, 0xd4, 0x57, 0xd1, 0xc4, 0x3b, 0xb2, 0x56, 0x49, 0x61, - 0x18, 0xc4, 0x11, 0x8a, 0xc7, 0x7c, 0x26, 0xf0, 0xd2, 0x01, 0xa5, 0x29, 0x21, 0xd9, 0x30, 0xe5, - 0xc7, 0xb4, 0x83, 0x93, 0x93, 0x98, 0xaa, 0xfb, 0xb3, 0x16, 0x48, 0x68, 0x17, 0x11, 0x72, 0x1b, - 0x0a, 0xd2, 0xe2, 0x8e, 0x4f, 0x8d, 0x49, 0xf4, 0x6e, 0x60, 0x4b, 0xcf, 0x8f, 0x7b, 0xcc, 0x73, - 0x65, 0x55, 0xe6, 0x94, 0xe7, 0x68, 0x9b, 0x2e, 0x79, 0x06, 0xe5, 0x64, 0xcb, 0x3e, 0x63, 0xdc, - 0xc5, 0x1e, 0x39, 0xbd, 0xf1, 0x70, 0xac, 0x88, 0x6e, 0x2a, 0xb1, 0x1d, 0xc6, 0x5d, 0xab, 0x74, - 0x3c, 0x34, 0xae, 0xc4, 0x75, 0xea, 0x5a, 0x5c, 0x97, 0xa1, 0x7c, 0xea, 0xc4, 0x76, 0x32, 0x75, - 0xd5, 0xa4, 0x28, 0x58, 0x53, 0xa7, 0x4e, 0x9c, 0x4c, 0xe6, 0x21, 0x49, 0xbf, 0x46, 0x4d, 0x0b, - 0x4d, 0x4a, 0x30, 0xb2, 0x02, 0x15, 0x49, 0xf2, 0x18, 0xa7, 0x36, 0xef, 0xf9, 0xc7, 0x34, 0x52, - 0x53, 0xa3, 0x60, 0x4d, 0x9f, 0x3a, 0x71, 0x93, 0x71, 0xda, 0x52, 0x28, 0x59, 0x85, 0x59, 0xc9, - 0x64, 0x1c, 0xb9, 0x7a, 0x00, 0x01, 0x52, 0x67, 0x4e, 0x9d, 0xd8, 0x44, 0x5c, 0x4d, 0xa1, 0xea, - 0xf7, 0x69, 0x28, 0x24, 0x3f, 0x53, 0xae, 0x05, 0x76, 0x19, 0xca, 0xfa, 0xa7, 0x90, 0x2e, 0x22, - 0x15, 0xd9, 0x29, 0x0d, 0xaa, 0xfa, 0x31, 0x20, 0xef, 0xb8, 0x6e, 0x44, 0xe3, 0x58, 0x47, 0x35, - 0x31, 0xc9, 0x0e, 0xe6, 0x34, 0xd5, 0x3f, 0x9d, 0xc6, 0x1e, 0xcc, 0xc9, 0x3c, 0x42, 0x11, 0xf2, - 0x7f, 0x28, 0xb2, 0xd8, 0x3e, 0x09, 0x3c, 0x97, 0xba, 0x18, 0xfe, 0x82, 0x55, 0x60, 0xf1, 0x36, - 0xda, 0x38, 0x4b, 0xfb, 0x21, 0xd5, 0x5e, 0xe6, 0xb0, 0xd4, 0x8b, 0x12, 0x51, 0x2e, 0x5e, 0x0e, - 0x52, 0xfe, 0x6a, 0x90, 0xaa, 0x47, 0x38, 0x38, 0xb0, 0x81, 0x25, 0x81, 0x1a, 0x34, 0x30, 0xf9, - 0xa2, 0x72, 0x82, 0x2a, 0x39, 0xa2, 0xdf, 0xa5, 0x9b, 0x30, 0xba, 0x37, 0x0f, 0xb9, 0x4e, 0xe0, - 0xf5, 0x7c, 0xae, 0xeb, 0x49, 0x5b, 0xd5, 0x17, 0x29, 0x28, 0x24, 0x81, 0xbe, 0xf6, 0x7d, 0x09, - 0x64, 0x31, 0x9b, 0xb5, 0x10, 0x66, 0xf2, 0x22, 0x94, 0xe2, 0x7e, 0x2c, 0xa8, 0x6f, 0xe3, 0x96, - 0x52, 0x03, 0x05, 0xb5, 0x24, 0x61, 0xb4, 0x0c, 0xb2, 0x57, 0xca, 0xe0, 0x0e, 0x80, 0x6a, 0xa8, - 0xe8, 0x9f, 0x2a, 0x92, 0x22, 0x22, 0xf2, 0x7d, 0xab, 0x3f, 0xa4, 0x60, 0xfe, 0xe6, 0xf6, 0x4e, - 0xee, 0xc1, 0x72, 0xfd, 0xf1, 0x63, 0xab, 0xf1, 0xb8, 0xde, 0x36, 0x77, 0x5b, 0x76, 0xbb, 0xf1, - 0x74, 0x6f, 0xd7, 0xaa, 0x37, 0xcd, 0xf6, 0x91, 0x7d, 0xd0, 0xda, 0xdf, 0x6b, 0x3c, 0x32, 0xb7, - 0xcd, 0xc6, 0x56, 0x65, 0x82, 0xdc, 0x85, 0x3b, 0xef, 0x22, 0x6e, 0x35, 0x9a, 0xed, 0x7a, 0x25, - 0x45, 0xde, 0x87, 0xea, 0xbb, 0x28, 0x8f, 0x0e, 0x9e, 0x1e, 0x34, 0xeb, 0x6d, 0xf3, 0xb0, 0x51, - 0x49, 0xaf, 0x7e, 0x0e, 0xa5, 0x91, 0xba, 0x22, 0xb7, 0x60, 0x66, 0xf3, 0xc0, 0x6c, 0x6e, 0xd9, - 0xe6, 0x96, 0xdd, 0x34, 0x5b, 0x3b, 0x0d, 0xab, 0x32, 0x41, 0x0c, 0x98, 0x1b, 0x80, 0x9b, 0x66, - 0xab, 0x6e, 0x1d, 0xd9, 0x4f, 0xea, 0xfb, 0x4f, 0x2a, 0xa9, 0xcd, 0x9f, 0x52, 0x2f, 0xdf, 0x2c, - 0xa4, 0x5e, 0xbd, 0x59, 0x48, 0xfd, 0xf9, 0x66, 0x21, 0xf5, 0xe3, 0xdb, 0x85, 0x89, 0x57, 0x6f, - 0x17, 0x26, 0x7e, 0x7f, 0xbb, 0x30, 0xf1, 0xad, 0x35, 0xf6, 0x24, 0x56, 0xff, 0x1b, 0x75, 0x29, - 0x7f, 0xd7, 0xbf, 0x68, 0x3f, 0xa7, 0xef, 0xef, 0x86, 0x94, 0xb7, 0x07, 0x8a, 0x7b, 0x98, 0xbe, - 0x7b, 0x49, 0xfa, 0x1e, 0xae, 0x37, 0x46, 0xd8, 0xc7, 0x39, 0xd4, 0x7b, 0xf0, 0x77, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xef, 0x03, 0x47, 0x6d, 0x06, 0x0e, 0x00, 0x00, + // 1480 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4f, 0x4f, 0x23, 0x47, + 0x16, 0xa7, 0xb1, 0xf1, 0x9f, 0x67, 0x0c, 0xa6, 0x86, 0x65, 0x7b, 0x67, 0x35, 0xc0, 0x18, 0xed, + 0x0e, 0xcb, 0x48, 0x66, 0x61, 0x76, 0xa3, 0x49, 0x14, 0x29, 0x31, 0x83, 0x19, 0x5a, 0x78, 0x0c, + 0x29, 0x0c, 0x09, 0xd1, 0x44, 0xad, 0xc6, 0x5d, 0x98, 0x16, 0xdd, 0xd5, 0xad, 0xee, 0x32, 0xc2, + 0x52, 0x8e, 0x39, 0x45, 0x39, 0xe4, 0x9c, 0x8f, 0x90, 0x5b, 0x3e, 0x41, 0xae, 0x23, 0xe5, 0x32, + 0x97, 0x48, 0x51, 0x0e, 0xa3, 0x68, 0xe6, 0x6b, 0xe4, 0x10, 0xd5, 0xab, 0x6a, 0xdb, 0x30, 0xcc, + 0xc1, 0x73, 0x41, 0xf5, 0x7e, 0xf5, 0xea, 0x57, 0xaf, 0xfa, 0xbd, 0xdf, 0x7b, 0x06, 0x3e, 0x09, + 0x23, 0xc6, 0x05, 0xf3, 0x59, 0xc0, 0x44, 0xdc, 0x5f, 0x8f, 0xe2, 0x50, 0x84, 0xf2, 0xef, 0x99, + 0xe7, 0xb3, 0x64, 0xfd, 0x72, 0x83, 0x5d, 0x45, 0x2c, 0xf6, 0x02, 0xc6, 0x85, 0xe3, 0xaf, 0x47, + 0x72, 0x83, 0x5d, 0x09, 0xc6, 0x5d, 0xe6, 0xd6, 0xd0, 0x97, 0x3c, 0xbc, 0x46, 0xa0, 0xc0, 0x5a, + 0x4a, 0x50, 0xbb, 0x4e, 0x70, 0x77, 0xbe, 0x1b, 0x76, 0x43, 0x75, 0x87, 0x5c, 0x29, 0xef, 0xbb, + 0x6b, 0xb7, 0xc5, 0xd0, 0x09, 0x83, 0x20, 0xe4, 0xeb, 0x97, 0x1b, 0x7a, 0xa5, 0x7c, 0xab, 0xbf, + 0x14, 0x20, 0x7f, 0xa0, 0xd8, 0xc9, 0xe7, 0x50, 0x4a, 0x9c, 0x20, 0xf2, 0x99, 0x2d, 0xfa, 0x11, + 0x33, 0x8d, 0xe5, 0xcc, 0x6a, 0x69, 0xf3, 0x83, 0xda, 0x18, 0x01, 0xd5, 0x8e, 0x1d, 0xbf, 0xc7, + 0xda, 0xfd, 0x88, 0x51, 0x50, 0x54, 0x72, 0x4d, 0xf6, 0x20, 0xa7, 0x2c, 0x73, 0x12, 0x39, 0x1f, + 0x8d, 0xc5, 0x79, 0x88, 0x47, 0xa9, 0xa6, 0x20, 0x2d, 0xc8, 0x07, 0x4e, 0x14, 0x79, 0xbc, 0x6b, + 0x66, 0x90, 0xed, 0x7f, 0x63, 0xb1, 0x3d, 0x53, 0x67, 0x69, 0x4a, 0x42, 0x3e, 0x83, 0x82, 0x1f, + 0x76, 0x1c, 0xe1, 0x85, 0xdc, 0xcc, 0x22, 0xe1, 0xff, 0xc7, 0x22, 0x6c, 0xea, 0xc3, 0x74, 0x40, + 0x43, 0xfe, 0x03, 0x95, 0x74, 0x6d, 0x7b, 0xdc, 0xf5, 0x3a, 0x2c, 0x31, 0x67, 0x97, 0x33, 0xab, + 0x19, 0x3a, 0x9b, 0xe2, 0x96, 0x82, 0xe5, 0xed, 0x67, 0x3d, 0xde, 0xc1, 0xdb, 0xa7, 0xde, 0xe3, + 0xf6, 0x1d, 0x7d, 0x98, 0x0e, 0x68, 0xc8, 0x31, 0xcc, 0x3a, 0x42, 0xc4, 0xde, 0x69, 0x4f, 0x30, + 0x5b, 0x38, 0xa7, 0x3e, 0x33, 0x2b, 0xc8, 0xfc, 0xe0, 0x56, 0x66, 0x5d, 0x0e, 0x97, 0x1b, 0xb5, + 0x3d, 0xd6, 0xc7, 0xfc, 0x6d, 0x65, 0x5f, 0xbc, 0x5a, 0x9a, 0xa0, 0x33, 0x03, 0x96, 0xb6, 0x24, + 0x21, 0x9d, 0x51, 0xde, 0x1e, 0xf7, 0x44, 0x62, 0xce, 0x21, 0xef, 0x47, 0x63, 0x45, 0x5c, 0x4f, + 0x39, 0x8e, 0xb8, 0x27, 0x46, 0x2e, 0x91, 0x66, 0x42, 0x0e, 0x00, 0x7c, 0x8f, 0x5f, 0xe8, 0xb8, + 0x09, 0xf2, 0x6f, 0x8c, 0x97, 0x0f, 0x8f, 0x5f, 0xd0, 0xa2, 0x24, 0x51, 0x61, 0xdf, 0x87, 0xe9, + 0x44, 0xc4, 0x1e, 0xef, 0x6a, 0xce, 0xdc, 0x72, 0x66, 0xb5, 0x48, 0x4b, 0x0a, 0x53, 0x2e, 0x4b, + 0x50, 0x72, 0xe3, 0x30, 0xb2, 0xcf, 0x62, 0x27, 0x60, 0x89, 0x99, 0x5f, 0x36, 0x56, 0x33, 0x14, + 0x24, 0xb4, 0x83, 0x88, 0x74, 0xb8, 0x60, 0x6c, 0xe0, 0x50, 0x50, 0x0e, 0x12, 0xd2, 0x0e, 0xf7, + 0x00, 0x84, 0x17, 0x30, 0x9b, 0x3b, 0x3c, 0x4c, 0xcc, 0x22, 0xee, 0x17, 0x25, 0xd2, 0x92, 0x00, + 0xf9, 0x17, 0xcc, 0xb8, 0xbd, 0x58, 0x15, 0x84, 0x72, 0x01, 0x74, 0x29, 0xa7, 0xa8, 0x72, 0xfb, + 0x0a, 0x4a, 0xf2, 0x21, 0xa1, 0xab, 0x04, 0x58, 0x5a, 0x36, 0xde, 0x5f, 0x80, 0x3a, 0x89, 0xa0, + 0x08, 0x51, 0x86, 0x0b, 0x90, 0x53, 0x96, 0x39, 0x8d, 0xb7, 0x6b, 0x8b, 0x98, 0x90, 0x97, 0x45, + 0xc0, 0xb8, 0x30, 0xcb, 0x58, 0xa5, 0xa9, 0x49, 0x6a, 0x70, 0xc7, 0x65, 0x67, 0x4e, 0xcf, 0x17, + 0xf6, 0x68, 0x67, 0x98, 0xc1, 0xe3, 0x73, 0x7a, 0xeb, 0x70, 0x20, 0xf4, 0xea, 0x2e, 0x94, 0xaf, + 0xa5, 0x97, 0xac, 0x40, 0x79, 0x58, 0x33, 0x17, 0xac, 0x6f, 0x1a, 0x78, 0x74, 0x7a, 0x00, 0xee, + 0xb1, 0x3e, 0x21, 0x90, 0x95, 0xe5, 0x64, 0x4e, 0xe2, 0x1e, 0xae, 0xab, 0x3f, 0x1b, 0x90, 0x95, + 0x99, 0x24, 0xcf, 0xa1, 0x20, 0x62, 0xa7, 0xc3, 0x6c, 0xcf, 0xc5, 0xc3, 0xd3, 0x5b, 0x75, 0xf9, + 0xb0, 0xdf, 0x5f, 0x2d, 0x7d, 0xd8, 0x0d, 0x6f, 0x7c, 0x1a, 0x4f, 0xb6, 0x39, 0xdf, 0x67, 0x1d, + 0x11, 0xc6, 0xeb, 0x91, 0xeb, 0x08, 0x67, 0xdd, 0xe3, 0x82, 0xc5, 0xdc, 0xf1, 0xd7, 0xa5, 0x55, + 0x6b, 0x4b, 0x26, 0x6b, 0x9b, 0xe6, 0x91, 0xd2, 0x72, 0xc9, 0x09, 0xe4, 0x93, 0xc8, 0xe1, 0x92, + 0x7c, 0x12, 0xc9, 0x3f, 0xd5, 0xe4, 0x8f, 0xc7, 0x27, 0x3f, 0x8c, 0x1c, 0x6e, 0x6d, 0xd3, 0x9c, + 0x24, 0xb4, 0xdc, 0xea, 0x4f, 0x06, 0x14, 0x07, 0xd9, 0x90, 0x6f, 0xd4, 0x4d, 0x15, 0xdf, 0x28, + 0x34, 0x76, 0xf3, 0xdd, 0xe4, 0x6b, 0xf8, 0xbb, 0xd3, 0xed, 0xc6, 0xac, 0xab, 0x8a, 0x45, 0xb0, + 0x20, 0x0a, 0x63, 0xc7, 0xf7, 0x44, 0xdf, 0xcc, 0x2c, 0x1b, 0xab, 0x33, 0x9b, 0x4f, 0xc6, 0x13, + 0xdb, 0x90, 0xab, 0x3d, 0xa4, 0xa2, 0x0b, 0xce, 0xad, 0x78, 0xf5, 0x9b, 0x0c, 0xe4, 0x54, 0x3a, + 0x65, 0xc9, 0x8e, 0xf6, 0x30, 0x76, 0x85, 0xf3, 0x20, 0x4b, 0xcb, 0x23, 0x1d, 0x8c, 0x5d, 0x91, + 0x4d, 0xf8, 0x5b, 0x0a, 0x24, 0x76, 0x22, 0x9c, 0x58, 0x68, 0x6f, 0x29, 0xa2, 0x2c, 0xbd, 0x33, + 0xd8, 0x3c, 0x94, 0x7b, 0xea, 0xcc, 0x48, 0x7b, 0x4c, 0x6c, 0x9f, 0xf1, 0xae, 0x38, 0x47, 0x49, + 0x65, 0x87, 0xed, 0x31, 0x69, 0x22, 0x2c, 0x0b, 0x30, 0x11, 0x4e, 0xe7, 0x22, 0x2d, 0x01, 0x4d, + 0x2e, 0x05, 0x56, 0xa6, 0x73, 0xc3, 0x2d, 0xcb, 0x55, 0xd4, 0xf3, 0x30, 0x75, 0x29, 0xbf, 0x39, + 0x0e, 0x9a, 0x0c, 0x55, 0x06, 0xd9, 0x85, 0x29, 0xdf, 0x39, 0x65, 0xbe, 0x1e, 0x18, 0x9b, 0xe3, + 0xf5, 0x13, 0x79, 0x92, 0x2a, 0x02, 0xb2, 0x08, 0x30, 0x28, 0x5d, 0x29, 0x62, 0xf9, 0x45, 0x46, + 0x10, 0x99, 0x52, 0xd9, 0x79, 0x50, 0x60, 0x59, 0x8a, 0x6b, 0xf2, 0x5f, 0x98, 0x97, 0x9d, 0x20, + 0x11, 0x4e, 0x10, 0x25, 0xb2, 0x71, 0x5e, 0x61, 0x0f, 0x40, 0xad, 0x65, 0x29, 0x19, 0xee, 0x1d, + 0x71, 0xef, 0x4a, 0x36, 0x82, 0xea, 0x17, 0x30, 0x85, 0xb7, 0x92, 0x0a, 0x64, 0x86, 0xa2, 0x91, + 0x4b, 0x89, 0x24, 0x22, 0xd6, 0x25, 0x23, 0x97, 0x12, 0xe1, 0xbd, 0x00, 0xab, 0x23, 0x43, 0xe5, + 0x92, 0xfc, 0x03, 0x0a, 0xbc, 0x17, 0x60, 0x8b, 0x36, 0xb3, 0x08, 0xe7, 0x79, 0x2f, 0x90, 0x7a, + 0xac, 0xfe, 0x9a, 0x81, 0xbc, 0x9e, 0x80, 0x64, 0x06, 0x26, 0xb5, 0xa6, 0xb2, 0x74, 0xd2, 0x73, + 0x65, 0xa3, 0x0c, 0x58, 0x10, 0xc6, 0x7d, 0x95, 0x47, 0xbc, 0x23, 0x4b, 0x4b, 0x0a, 0xc3, 0xf4, + 0x8d, 0xb8, 0xf8, 0x5e, 0xe0, 0x09, 0xbc, 0x74, 0xe0, 0xd2, 0x94, 0x90, 0x6c, 0x95, 0xf2, 0x33, + 0xda, 0xe1, 0xd9, 0x59, 0xc2, 0xd4, 0xfd, 0x59, 0x0a, 0x12, 0xda, 0x47, 0x84, 0xdc, 0x85, 0x82, + 0xb4, 0xb8, 0x13, 0x30, 0x73, 0x0a, 0xa3, 0x1b, 0xd8, 0x32, 0xf2, 0xd3, 0x9e, 0xe7, 0xbb, 0x52, + 0x8f, 0x39, 0x15, 0x39, 0xda, 0x96, 0x4b, 0x9e, 0x43, 0x39, 0xdd, 0xb2, 0x2f, 0x3c, 0xee, 0x62, + 0x77, 0x9c, 0xd9, 0x7c, 0x3c, 0x56, 0x2e, 0xb7, 0x14, 0xd9, 0x9e, 0xc7, 0x5d, 0x5a, 0x3a, 0x1d, + 0x1a, 0x37, 0xf2, 0x3a, 0xfd, 0x56, 0x5e, 0x57, 0xa0, 0x7c, 0xee, 0x24, 0x76, 0x3a, 0x63, 0xd5, + 0x8c, 0x28, 0xd0, 0xe9, 0x73, 0x27, 0x49, 0x27, 0xf0, 0xd0, 0x49, 0xbf, 0x46, 0xcd, 0x09, 0xed, + 0x94, 0x62, 0x64, 0x15, 0x2a, 0xd2, 0xc9, 0xf7, 0x38, 0xb3, 0x79, 0x2f, 0x38, 0x65, 0xb1, 0x9a, + 0x17, 0x05, 0x3a, 0x73, 0xee, 0x24, 0x4d, 0x8f, 0xb3, 0x96, 0x42, 0xc9, 0x1a, 0xcc, 0x49, 0x4f, + 0x8f, 0xa3, 0xaf, 0x1e, 0x3d, 0x80, 0xae, 0xb3, 0xe7, 0x4e, 0x62, 0x21, 0xae, 0xe6, 0x4f, 0xf5, + 0x4f, 0x03, 0x0a, 0xe9, 0x0f, 0x91, 0xb7, 0x12, 0xbb, 0x02, 0x65, 0xfd, 0x63, 0x47, 0xcb, 0x47, + 0x65, 0x76, 0x5a, 0x83, 0x4a, 0x39, 0x26, 0xe4, 0x1d, 0xd7, 0x8d, 0x59, 0x92, 0xe8, 0xac, 0xa6, + 0x26, 0x69, 0x60, 0x4d, 0x33, 0xfd, 0xe3, 0x68, 0xec, 0x61, 0xcc, 0x50, 0x06, 0x8c, 0xfc, 0x13, + 0x8a, 0x5e, 0x62, 0x9f, 0x85, 0xbe, 0xcb, 0x5c, 0x4c, 0x7c, 0x81, 0x16, 0xbc, 0x64, 0x07, 0x6d, + 0x9c, 0x9f, 0xfd, 0x88, 0xe9, 0xf8, 0x72, 0x28, 0xef, 0xa2, 0x44, 0x54, 0x70, 0xd7, 0xd3, 0x93, + 0xbf, 0x99, 0x9e, 0xea, 0x09, 0x0e, 0x0b, 0x6c, 0x5a, 0x69, 0x8a, 0x06, 0x4d, 0x4b, 0xbe, 0xa5, + 0x9c, 0xa2, 0x8a, 0x8e, 0xe8, 0x17, 0xe9, 0xc6, 0x8b, 0xe1, 0x2d, 0x40, 0xae, 0x13, 0xfa, 0xbd, + 0x80, 0x6b, 0x25, 0x69, 0xab, 0xfa, 0xad, 0x01, 0x85, 0x34, 0xc5, 0x6f, 0x7d, 0x59, 0x02, 0x59, + 0xac, 0x63, 0x4d, 0x84, 0x35, 0xbc, 0x04, 0xa5, 0xa4, 0x9f, 0x08, 0x16, 0xd8, 0xb8, 0xa5, 0xd8, + 0x40, 0x41, 0x2d, 0xe9, 0x30, 0x2a, 0x80, 0xec, 0x0d, 0x01, 0xdc, 0x03, 0x50, 0x4d, 0x14, 0xe3, + 0x53, 0xf2, 0x28, 0x22, 0x22, 0xdf, 0xb7, 0xf6, 0x9d, 0x01, 0x0b, 0xb7, 0xb7, 0x74, 0xf2, 0x00, + 0x56, 0xea, 0x4f, 0x9f, 0xd2, 0xc6, 0xd3, 0x7a, 0xdb, 0xda, 0x6f, 0xd9, 0xed, 0xc6, 0xb3, 0x83, + 0x7d, 0x5a, 0x6f, 0x5a, 0xed, 0x13, 0xfb, 0xa8, 0x75, 0x78, 0xd0, 0x78, 0x62, 0xed, 0x58, 0x8d, + 0xed, 0xca, 0x04, 0xb9, 0x0f, 0xf7, 0xde, 0xe5, 0xb8, 0xdd, 0x68, 0xb6, 0xeb, 0x15, 0x83, 0xfc, + 0x1b, 0xaa, 0xef, 0x72, 0x79, 0x72, 0xf4, 0xec, 0xa8, 0x59, 0x6f, 0x5b, 0xc7, 0x8d, 0xca, 0xe4, + 0xda, 0xc7, 0x50, 0x1a, 0x51, 0x14, 0xb9, 0x03, 0xb3, 0x5b, 0x47, 0x56, 0x73, 0xdb, 0xb6, 0xb6, + 0xed, 0xa6, 0xd5, 0xda, 0x6b, 0xd0, 0xca, 0x04, 0x31, 0x61, 0x7e, 0x00, 0x6e, 0x59, 0xad, 0x3a, + 0x3d, 0xb1, 0x77, 0xeb, 0x87, 0xbb, 0x15, 0x63, 0xeb, 0x07, 0xe3, 0xc5, 0xeb, 0x45, 0xe3, 0xe5, + 0xeb, 0x45, 0xe3, 0x8f, 0xd7, 0x8b, 0xc6, 0xf7, 0x6f, 0x16, 0x27, 0x5e, 0xbe, 0x59, 0x9c, 0xf8, + 0xed, 0xcd, 0xe2, 0xc4, 0x97, 0x74, 0xec, 0xe9, 0xab, 0xfe, 0xcb, 0xe9, 0x32, 0xfe, 0xae, 0x7f, + 0xb6, 0x7e, 0x9c, 0x7c, 0xb8, 0x1f, 0x31, 0xde, 0x1e, 0x30, 0x1e, 0x60, 0xe1, 0x1e, 0xa4, 0x85, + 0x7b, 0xbc, 0xd1, 0x18, 0xf1, 0x3e, 0xcd, 0x21, 0xdf, 0xa3, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, + 0x92, 0x79, 0x01, 0x14, 0xd0, 0x0d, 0x00, 0x00, } func (m *Profile) Marshal() (dAtA []byte, err error) { @@ -2490,7 +2490,7 @@ func (m *Profile) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SampleType = append(m.SampleType, ValueType{}) + m.SampleType = append(m.SampleType, &ValueType{}) if err := m.SampleType[len(m.SampleType)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2524,7 +2524,7 @@ func (m *Profile) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Sample = append(m.Sample, Sample{}) + m.Sample = append(m.Sample, &Sample{}) if err := m.Sample[len(m.Sample)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2558,7 +2558,7 @@ func (m *Profile) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Mapping = append(m.Mapping, Mapping{}) + m.Mapping = append(m.Mapping, &Mapping{}) if err := m.Mapping[len(m.Mapping)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2592,7 +2592,7 @@ func (m *Profile) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Location = append(m.Location, Location{}) + m.Location = append(m.Location, &Location{}) if err := m.Location[len(m.Location)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2626,7 +2626,7 @@ func (m *Profile) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Function = append(m.Function, Function{}) + m.Function = append(m.Function, &Function{}) if err := m.Function[len(m.Function)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3025,7 +3025,7 @@ func (m *Profile) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AttributeUnits = append(m.AttributeUnits, AttributeUnit{}) + m.AttributeUnits = append(m.AttributeUnits, &AttributeUnit{}) if err := m.AttributeUnits[len(m.AttributeUnits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3059,7 +3059,7 @@ func (m *Profile) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.LinkTable = append(m.LinkTable, Link{}) + m.LinkTable = append(m.LinkTable, &Link{}) if err := m.LinkTable[len(m.LinkTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3606,7 +3606,7 @@ func (m *Sample) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Label = append(m.Label, Label{}) + m.Label = append(m.Label, &Label{}) if err := m.Label[len(m.Label)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4440,7 +4440,7 @@ func (m *Location) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Line = append(m.Line, Line{}) + m.Line = append(m.Line, &Line{}) if err := m.Line[len(m.Line)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/pdata/pprofile/generated_attributeunitslice.go b/pdata/pprofile/generated_attributeunitslice.go index 95274cfe446..eaf8baf57ed 100644 --- a/pdata/pprofile/generated_attributeunitslice.go +++ b/pdata/pprofile/generated_attributeunitslice.go @@ -7,6 +7,8 @@ package pprofile import ( + "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" ) @@ -19,18 +21,18 @@ import ( // Must use NewAttributeUnitSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type AttributeUnitSlice struct { - orig *[]otlpprofiles.AttributeUnit + orig *[]*otlpprofiles.AttributeUnit state *internal.State } -func newAttributeUnitSlice(orig *[]otlpprofiles.AttributeUnit, state *internal.State) AttributeUnitSlice { +func newAttributeUnitSlice(orig *[]*otlpprofiles.AttributeUnit, state *internal.State) AttributeUnitSlice { return AttributeUnitSlice{orig: orig, state: state} } // NewAttributeUnitSlice creates a AttributeUnitSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewAttributeUnitSlice() AttributeUnitSlice { - orig := []otlpprofiles.AttributeUnit(nil) + orig := []*otlpprofiles.AttributeUnit(nil) state := internal.StateMutable return newAttributeUnitSlice(&orig, &state) } @@ -51,7 +53,7 @@ func (es AttributeUnitSlice) Len() int { // ... // Do something with the element // } func (es AttributeUnitSlice) At(i int) AttributeUnit { - return newAttributeUnit(&(*es.orig)[i], es.state) + return newAttributeUnit((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -73,7 +75,7 @@ func (es AttributeUnitSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]otlpprofiles.AttributeUnit, len(*es.orig), newCap) + newOrig := make([]*otlpprofiles.AttributeUnit, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -82,7 +84,7 @@ func (es AttributeUnitSlice) EnsureCapacity(newCap int) { // It returns the newly added AttributeUnit. func (es AttributeUnitSlice) AppendEmpty() AttributeUnit { es.state.AssertMutable() - *es.orig = append(*es.orig, otlpprofiles.AttributeUnit{}) + *es.orig = append(*es.orig, &otlpprofiles.AttributeUnit{}) return es.At(es.Len() - 1) } @@ -127,10 +129,24 @@ func (es AttributeUnitSlice) CopyTo(dest AttributeUnitSlice) { destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] - } else { - (*dest.orig) = make([]otlpprofiles.AttributeUnit, srcLen) + for i := range *es.orig { + newAttributeUnit((*es.orig)[i], es.state).CopyTo(newAttributeUnit((*dest.orig)[i], dest.state)) + } + return } + origs := make([]otlpprofiles.AttributeUnit, srcLen) + wrappers := make([]*otlpprofiles.AttributeUnit, srcLen) for i := range *es.orig { - newAttributeUnit(&(*es.orig)[i], es.state).CopyTo(newAttributeUnit(&(*dest.orig)[i], dest.state)) + wrappers[i] = &origs[i] + newAttributeUnit((*es.orig)[i], es.state).CopyTo(newAttributeUnit(wrappers[i], dest.state)) } + *dest.orig = wrappers +} + +// Sort sorts the AttributeUnit elements within AttributeUnitSlice given the +// provided less function so that two instances of AttributeUnitSlice +// can be compared. +func (es AttributeUnitSlice) Sort(less func(a, b AttributeUnit) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pprofile/generated_attributeunitslice_test.go b/pdata/pprofile/generated_attributeunitslice_test.go index 0dd3420015a..6fa007bca75 100644 --- a/pdata/pprofile/generated_attributeunitslice_test.go +++ b/pdata/pprofile/generated_attributeunitslice_test.go @@ -8,6 +8,7 @@ package pprofile import ( "testing" + "unsafe" "github.com/stretchr/testify/assert" @@ -19,7 +20,7 @@ func TestAttributeUnitSlice(t *testing.T) { es := NewAttributeUnitSlice() assert.Equal(t, 0, es.Len()) state := internal.StateMutable - es = newAttributeUnitSlice(&[]otlpprofiles.AttributeUnit{}, &state) + es = newAttributeUnitSlice(&[]*otlpprofiles.AttributeUnit{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewAttributeUnit() @@ -35,7 +36,7 @@ func TestAttributeUnitSlice(t *testing.T) { func TestAttributeUnitSliceReadOnly(t *testing.T) { sharedState := internal.StateReadOnly - es := newAttributeUnitSlice(&[]otlpprofiles.AttributeUnit{}, &sharedState) + es := newAttributeUnitSlice(&[]*otlpprofiles.AttributeUnit{}, &sharedState) assert.Equal(t, 0, es.Len()) assert.Panics(t, func() { es.AppendEmpty() }) assert.Panics(t, func() { es.EnsureCapacity(2) }) @@ -122,6 +123,22 @@ func TestAttributeUnitSlice_RemoveIf(t *testing.T) { assert.Equal(t, 5, filtered.Len()) } +func TestAttributeUnitSlice_Sort(t *testing.T) { + es := generateTestAttributeUnitSlice() + es.Sort(func(a, b AttributeUnit) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Less(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b AttributeUnit) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Greater(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + func generateTestAttributeUnitSlice() AttributeUnitSlice { es := NewAttributeUnitSlice() fillTestAttributeUnitSlice(es) @@ -129,9 +146,9 @@ func generateTestAttributeUnitSlice() AttributeUnitSlice { } func fillTestAttributeUnitSlice(es AttributeUnitSlice) { - *es.orig = make([]otlpprofiles.AttributeUnit, 7) + *es.orig = make([]*otlpprofiles.AttributeUnit, 7) for i := 0; i < 7; i++ { - (*es.orig)[i] = otlpprofiles.AttributeUnit{} - fillTestAttributeUnit(newAttributeUnit(&(*es.orig)[i], es.state)) + (*es.orig)[i] = &otlpprofiles.AttributeUnit{} + fillTestAttributeUnit(newAttributeUnit((*es.orig)[i], es.state)) } } diff --git a/pdata/pprofile/generated_functionslice.go b/pdata/pprofile/generated_functionslice.go index 171ba345b01..9c295899efd 100644 --- a/pdata/pprofile/generated_functionslice.go +++ b/pdata/pprofile/generated_functionslice.go @@ -7,6 +7,8 @@ package pprofile import ( + "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" ) @@ -19,18 +21,18 @@ import ( // Must use NewFunctionSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type FunctionSlice struct { - orig *[]otlpprofiles.Function + orig *[]*otlpprofiles.Function state *internal.State } -func newFunctionSlice(orig *[]otlpprofiles.Function, state *internal.State) FunctionSlice { +func newFunctionSlice(orig *[]*otlpprofiles.Function, state *internal.State) FunctionSlice { return FunctionSlice{orig: orig, state: state} } // NewFunctionSlice creates a FunctionSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewFunctionSlice() FunctionSlice { - orig := []otlpprofiles.Function(nil) + orig := []*otlpprofiles.Function(nil) state := internal.StateMutable return newFunctionSlice(&orig, &state) } @@ -51,7 +53,7 @@ func (es FunctionSlice) Len() int { // ... // Do something with the element // } func (es FunctionSlice) At(i int) Function { - return newFunction(&(*es.orig)[i], es.state) + return newFunction((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -73,7 +75,7 @@ func (es FunctionSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]otlpprofiles.Function, len(*es.orig), newCap) + newOrig := make([]*otlpprofiles.Function, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -82,7 +84,7 @@ func (es FunctionSlice) EnsureCapacity(newCap int) { // It returns the newly added Function. func (es FunctionSlice) AppendEmpty() Function { es.state.AssertMutable() - *es.orig = append(*es.orig, otlpprofiles.Function{}) + *es.orig = append(*es.orig, &otlpprofiles.Function{}) return es.At(es.Len() - 1) } @@ -127,10 +129,24 @@ func (es FunctionSlice) CopyTo(dest FunctionSlice) { destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] - } else { - (*dest.orig) = make([]otlpprofiles.Function, srcLen) + for i := range *es.orig { + newFunction((*es.orig)[i], es.state).CopyTo(newFunction((*dest.orig)[i], dest.state)) + } + return } + origs := make([]otlpprofiles.Function, srcLen) + wrappers := make([]*otlpprofiles.Function, srcLen) for i := range *es.orig { - newFunction(&(*es.orig)[i], es.state).CopyTo(newFunction(&(*dest.orig)[i], dest.state)) + wrappers[i] = &origs[i] + newFunction((*es.orig)[i], es.state).CopyTo(newFunction(wrappers[i], dest.state)) } + *dest.orig = wrappers +} + +// Sort sorts the Function elements within FunctionSlice given the +// provided less function so that two instances of FunctionSlice +// can be compared. +func (es FunctionSlice) Sort(less func(a, b Function) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pprofile/generated_functionslice_test.go b/pdata/pprofile/generated_functionslice_test.go index c4311bf52d9..e83a4d9a530 100644 --- a/pdata/pprofile/generated_functionslice_test.go +++ b/pdata/pprofile/generated_functionslice_test.go @@ -8,6 +8,7 @@ package pprofile import ( "testing" + "unsafe" "github.com/stretchr/testify/assert" @@ -19,7 +20,7 @@ func TestFunctionSlice(t *testing.T) { es := NewFunctionSlice() assert.Equal(t, 0, es.Len()) state := internal.StateMutable - es = newFunctionSlice(&[]otlpprofiles.Function{}, &state) + es = newFunctionSlice(&[]*otlpprofiles.Function{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewFunction() @@ -35,7 +36,7 @@ func TestFunctionSlice(t *testing.T) { func TestFunctionSliceReadOnly(t *testing.T) { sharedState := internal.StateReadOnly - es := newFunctionSlice(&[]otlpprofiles.Function{}, &sharedState) + es := newFunctionSlice(&[]*otlpprofiles.Function{}, &sharedState) assert.Equal(t, 0, es.Len()) assert.Panics(t, func() { es.AppendEmpty() }) assert.Panics(t, func() { es.EnsureCapacity(2) }) @@ -122,6 +123,22 @@ func TestFunctionSlice_RemoveIf(t *testing.T) { assert.Equal(t, 5, filtered.Len()) } +func TestFunctionSlice_Sort(t *testing.T) { + es := generateTestFunctionSlice() + es.Sort(func(a, b Function) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Less(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b Function) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Greater(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + func generateTestFunctionSlice() FunctionSlice { es := NewFunctionSlice() fillTestFunctionSlice(es) @@ -129,9 +146,9 @@ func generateTestFunctionSlice() FunctionSlice { } func fillTestFunctionSlice(es FunctionSlice) { - *es.orig = make([]otlpprofiles.Function, 7) + *es.orig = make([]*otlpprofiles.Function, 7) for i := 0; i < 7; i++ { - (*es.orig)[i] = otlpprofiles.Function{} - fillTestFunction(newFunction(&(*es.orig)[i], es.state)) + (*es.orig)[i] = &otlpprofiles.Function{} + fillTestFunction(newFunction((*es.orig)[i], es.state)) } } diff --git a/pdata/pprofile/generated_labelslice.go b/pdata/pprofile/generated_labelslice.go index 5f865bfcbae..0296d634da0 100644 --- a/pdata/pprofile/generated_labelslice.go +++ b/pdata/pprofile/generated_labelslice.go @@ -7,6 +7,8 @@ package pprofile import ( + "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" ) @@ -19,18 +21,18 @@ import ( // Must use NewLabelSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type LabelSlice struct { - orig *[]otlpprofiles.Label + orig *[]*otlpprofiles.Label state *internal.State } -func newLabelSlice(orig *[]otlpprofiles.Label, state *internal.State) LabelSlice { +func newLabelSlice(orig *[]*otlpprofiles.Label, state *internal.State) LabelSlice { return LabelSlice{orig: orig, state: state} } // NewLabelSlice creates a LabelSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewLabelSlice() LabelSlice { - orig := []otlpprofiles.Label(nil) + orig := []*otlpprofiles.Label(nil) state := internal.StateMutable return newLabelSlice(&orig, &state) } @@ -51,7 +53,7 @@ func (es LabelSlice) Len() int { // ... // Do something with the element // } func (es LabelSlice) At(i int) Label { - return newLabel(&(*es.orig)[i], es.state) + return newLabel((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -73,7 +75,7 @@ func (es LabelSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]otlpprofiles.Label, len(*es.orig), newCap) + newOrig := make([]*otlpprofiles.Label, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -82,7 +84,7 @@ func (es LabelSlice) EnsureCapacity(newCap int) { // It returns the newly added Label. func (es LabelSlice) AppendEmpty() Label { es.state.AssertMutable() - *es.orig = append(*es.orig, otlpprofiles.Label{}) + *es.orig = append(*es.orig, &otlpprofiles.Label{}) return es.At(es.Len() - 1) } @@ -127,10 +129,24 @@ func (es LabelSlice) CopyTo(dest LabelSlice) { destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] - } else { - (*dest.orig) = make([]otlpprofiles.Label, srcLen) + for i := range *es.orig { + newLabel((*es.orig)[i], es.state).CopyTo(newLabel((*dest.orig)[i], dest.state)) + } + return } + origs := make([]otlpprofiles.Label, srcLen) + wrappers := make([]*otlpprofiles.Label, srcLen) for i := range *es.orig { - newLabel(&(*es.orig)[i], es.state).CopyTo(newLabel(&(*dest.orig)[i], dest.state)) + wrappers[i] = &origs[i] + newLabel((*es.orig)[i], es.state).CopyTo(newLabel(wrappers[i], dest.state)) } + *dest.orig = wrappers +} + +// Sort sorts the Label elements within LabelSlice given the +// provided less function so that two instances of LabelSlice +// can be compared. +func (es LabelSlice) Sort(less func(a, b Label) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pprofile/generated_labelslice_test.go b/pdata/pprofile/generated_labelslice_test.go index c399046f92e..4ae3f7a6cbd 100644 --- a/pdata/pprofile/generated_labelslice_test.go +++ b/pdata/pprofile/generated_labelslice_test.go @@ -8,6 +8,7 @@ package pprofile import ( "testing" + "unsafe" "github.com/stretchr/testify/assert" @@ -19,7 +20,7 @@ func TestLabelSlice(t *testing.T) { es := NewLabelSlice() assert.Equal(t, 0, es.Len()) state := internal.StateMutable - es = newLabelSlice(&[]otlpprofiles.Label{}, &state) + es = newLabelSlice(&[]*otlpprofiles.Label{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewLabel() @@ -35,7 +36,7 @@ func TestLabelSlice(t *testing.T) { func TestLabelSliceReadOnly(t *testing.T) { sharedState := internal.StateReadOnly - es := newLabelSlice(&[]otlpprofiles.Label{}, &sharedState) + es := newLabelSlice(&[]*otlpprofiles.Label{}, &sharedState) assert.Equal(t, 0, es.Len()) assert.Panics(t, func() { es.AppendEmpty() }) assert.Panics(t, func() { es.EnsureCapacity(2) }) @@ -122,6 +123,22 @@ func TestLabelSlice_RemoveIf(t *testing.T) { assert.Equal(t, 5, filtered.Len()) } +func TestLabelSlice_Sort(t *testing.T) { + es := generateTestLabelSlice() + es.Sort(func(a, b Label) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Less(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b Label) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Greater(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + func generateTestLabelSlice() LabelSlice { es := NewLabelSlice() fillTestLabelSlice(es) @@ -129,9 +146,9 @@ func generateTestLabelSlice() LabelSlice { } func fillTestLabelSlice(es LabelSlice) { - *es.orig = make([]otlpprofiles.Label, 7) + *es.orig = make([]*otlpprofiles.Label, 7) for i := 0; i < 7; i++ { - (*es.orig)[i] = otlpprofiles.Label{} - fillTestLabel(newLabel(&(*es.orig)[i], es.state)) + (*es.orig)[i] = &otlpprofiles.Label{} + fillTestLabel(newLabel((*es.orig)[i], es.state)) } } diff --git a/pdata/pprofile/generated_lineslice.go b/pdata/pprofile/generated_lineslice.go index b354560d090..3f8daed79e9 100644 --- a/pdata/pprofile/generated_lineslice.go +++ b/pdata/pprofile/generated_lineslice.go @@ -7,6 +7,8 @@ package pprofile import ( + "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" ) @@ -19,18 +21,18 @@ import ( // Must use NewLineSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type LineSlice struct { - orig *[]otlpprofiles.Line + orig *[]*otlpprofiles.Line state *internal.State } -func newLineSlice(orig *[]otlpprofiles.Line, state *internal.State) LineSlice { +func newLineSlice(orig *[]*otlpprofiles.Line, state *internal.State) LineSlice { return LineSlice{orig: orig, state: state} } // NewLineSlice creates a LineSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewLineSlice() LineSlice { - orig := []otlpprofiles.Line(nil) + orig := []*otlpprofiles.Line(nil) state := internal.StateMutable return newLineSlice(&orig, &state) } @@ -51,7 +53,7 @@ func (es LineSlice) Len() int { // ... // Do something with the element // } func (es LineSlice) At(i int) Line { - return newLine(&(*es.orig)[i], es.state) + return newLine((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -73,7 +75,7 @@ func (es LineSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]otlpprofiles.Line, len(*es.orig), newCap) + newOrig := make([]*otlpprofiles.Line, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -82,7 +84,7 @@ func (es LineSlice) EnsureCapacity(newCap int) { // It returns the newly added Line. func (es LineSlice) AppendEmpty() Line { es.state.AssertMutable() - *es.orig = append(*es.orig, otlpprofiles.Line{}) + *es.orig = append(*es.orig, &otlpprofiles.Line{}) return es.At(es.Len() - 1) } @@ -127,10 +129,24 @@ func (es LineSlice) CopyTo(dest LineSlice) { destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] - } else { - (*dest.orig) = make([]otlpprofiles.Line, srcLen) + for i := range *es.orig { + newLine((*es.orig)[i], es.state).CopyTo(newLine((*dest.orig)[i], dest.state)) + } + return } + origs := make([]otlpprofiles.Line, srcLen) + wrappers := make([]*otlpprofiles.Line, srcLen) for i := range *es.orig { - newLine(&(*es.orig)[i], es.state).CopyTo(newLine(&(*dest.orig)[i], dest.state)) + wrappers[i] = &origs[i] + newLine((*es.orig)[i], es.state).CopyTo(newLine(wrappers[i], dest.state)) } + *dest.orig = wrappers +} + +// Sort sorts the Line elements within LineSlice given the +// provided less function so that two instances of LineSlice +// can be compared. +func (es LineSlice) Sort(less func(a, b Line) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pprofile/generated_lineslice_test.go b/pdata/pprofile/generated_lineslice_test.go index 1f5a69ca3f4..fd53c0237a0 100644 --- a/pdata/pprofile/generated_lineslice_test.go +++ b/pdata/pprofile/generated_lineslice_test.go @@ -8,6 +8,7 @@ package pprofile import ( "testing" + "unsafe" "github.com/stretchr/testify/assert" @@ -19,7 +20,7 @@ func TestLineSlice(t *testing.T) { es := NewLineSlice() assert.Equal(t, 0, es.Len()) state := internal.StateMutable - es = newLineSlice(&[]otlpprofiles.Line{}, &state) + es = newLineSlice(&[]*otlpprofiles.Line{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewLine() @@ -35,7 +36,7 @@ func TestLineSlice(t *testing.T) { func TestLineSliceReadOnly(t *testing.T) { sharedState := internal.StateReadOnly - es := newLineSlice(&[]otlpprofiles.Line{}, &sharedState) + es := newLineSlice(&[]*otlpprofiles.Line{}, &sharedState) assert.Equal(t, 0, es.Len()) assert.Panics(t, func() { es.AppendEmpty() }) assert.Panics(t, func() { es.EnsureCapacity(2) }) @@ -122,6 +123,22 @@ func TestLineSlice_RemoveIf(t *testing.T) { assert.Equal(t, 5, filtered.Len()) } +func TestLineSlice_Sort(t *testing.T) { + es := generateTestLineSlice() + es.Sort(func(a, b Line) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Less(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b Line) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Greater(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + func generateTestLineSlice() LineSlice { es := NewLineSlice() fillTestLineSlice(es) @@ -129,9 +146,9 @@ func generateTestLineSlice() LineSlice { } func fillTestLineSlice(es LineSlice) { - *es.orig = make([]otlpprofiles.Line, 7) + *es.orig = make([]*otlpprofiles.Line, 7) for i := 0; i < 7; i++ { - (*es.orig)[i] = otlpprofiles.Line{} - fillTestLine(newLine(&(*es.orig)[i], es.state)) + (*es.orig)[i] = &otlpprofiles.Line{} + fillTestLine(newLine((*es.orig)[i], es.state)) } } diff --git a/pdata/pprofile/generated_linkslice.go b/pdata/pprofile/generated_linkslice.go index 3ae925ac09c..dca0febad1b 100644 --- a/pdata/pprofile/generated_linkslice.go +++ b/pdata/pprofile/generated_linkslice.go @@ -7,6 +7,8 @@ package pprofile import ( + "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" ) @@ -19,18 +21,18 @@ import ( // Must use NewLinkSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type LinkSlice struct { - orig *[]otlpprofiles.Link + orig *[]*otlpprofiles.Link state *internal.State } -func newLinkSlice(orig *[]otlpprofiles.Link, state *internal.State) LinkSlice { +func newLinkSlice(orig *[]*otlpprofiles.Link, state *internal.State) LinkSlice { return LinkSlice{orig: orig, state: state} } // NewLinkSlice creates a LinkSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewLinkSlice() LinkSlice { - orig := []otlpprofiles.Link(nil) + orig := []*otlpprofiles.Link(nil) state := internal.StateMutable return newLinkSlice(&orig, &state) } @@ -51,7 +53,7 @@ func (es LinkSlice) Len() int { // ... // Do something with the element // } func (es LinkSlice) At(i int) Link { - return newLink(&(*es.orig)[i], es.state) + return newLink((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -73,7 +75,7 @@ func (es LinkSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]otlpprofiles.Link, len(*es.orig), newCap) + newOrig := make([]*otlpprofiles.Link, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -82,7 +84,7 @@ func (es LinkSlice) EnsureCapacity(newCap int) { // It returns the newly added Link. func (es LinkSlice) AppendEmpty() Link { es.state.AssertMutable() - *es.orig = append(*es.orig, otlpprofiles.Link{}) + *es.orig = append(*es.orig, &otlpprofiles.Link{}) return es.At(es.Len() - 1) } @@ -127,10 +129,24 @@ func (es LinkSlice) CopyTo(dest LinkSlice) { destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] - } else { - (*dest.orig) = make([]otlpprofiles.Link, srcLen) + for i := range *es.orig { + newLink((*es.orig)[i], es.state).CopyTo(newLink((*dest.orig)[i], dest.state)) + } + return } + origs := make([]otlpprofiles.Link, srcLen) + wrappers := make([]*otlpprofiles.Link, srcLen) for i := range *es.orig { - newLink(&(*es.orig)[i], es.state).CopyTo(newLink(&(*dest.orig)[i], dest.state)) + wrappers[i] = &origs[i] + newLink((*es.orig)[i], es.state).CopyTo(newLink(wrappers[i], dest.state)) } + *dest.orig = wrappers +} + +// Sort sorts the Link elements within LinkSlice given the +// provided less function so that two instances of LinkSlice +// can be compared. +func (es LinkSlice) Sort(less func(a, b Link) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pprofile/generated_linkslice_test.go b/pdata/pprofile/generated_linkslice_test.go index 5d22fcd69ca..bec39e870c8 100644 --- a/pdata/pprofile/generated_linkslice_test.go +++ b/pdata/pprofile/generated_linkslice_test.go @@ -8,6 +8,7 @@ package pprofile import ( "testing" + "unsafe" "github.com/stretchr/testify/assert" @@ -19,7 +20,7 @@ func TestLinkSlice(t *testing.T) { es := NewLinkSlice() assert.Equal(t, 0, es.Len()) state := internal.StateMutable - es = newLinkSlice(&[]otlpprofiles.Link{}, &state) + es = newLinkSlice(&[]*otlpprofiles.Link{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewLink() @@ -35,7 +36,7 @@ func TestLinkSlice(t *testing.T) { func TestLinkSliceReadOnly(t *testing.T) { sharedState := internal.StateReadOnly - es := newLinkSlice(&[]otlpprofiles.Link{}, &sharedState) + es := newLinkSlice(&[]*otlpprofiles.Link{}, &sharedState) assert.Equal(t, 0, es.Len()) assert.Panics(t, func() { es.AppendEmpty() }) assert.Panics(t, func() { es.EnsureCapacity(2) }) @@ -122,6 +123,22 @@ func TestLinkSlice_RemoveIf(t *testing.T) { assert.Equal(t, 5, filtered.Len()) } +func TestLinkSlice_Sort(t *testing.T) { + es := generateTestLinkSlice() + es.Sort(func(a, b Link) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Less(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b Link) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Greater(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + func generateTestLinkSlice() LinkSlice { es := NewLinkSlice() fillTestLinkSlice(es) @@ -129,9 +146,9 @@ func generateTestLinkSlice() LinkSlice { } func fillTestLinkSlice(es LinkSlice) { - *es.orig = make([]otlpprofiles.Link, 7) + *es.orig = make([]*otlpprofiles.Link, 7) for i := 0; i < 7; i++ { - (*es.orig)[i] = otlpprofiles.Link{} - fillTestLink(newLink(&(*es.orig)[i], es.state)) + (*es.orig)[i] = &otlpprofiles.Link{} + fillTestLink(newLink((*es.orig)[i], es.state)) } } diff --git a/pdata/pprofile/generated_locationslice.go b/pdata/pprofile/generated_locationslice.go index e5751c4dcb6..4848a46d925 100644 --- a/pdata/pprofile/generated_locationslice.go +++ b/pdata/pprofile/generated_locationslice.go @@ -7,6 +7,8 @@ package pprofile import ( + "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" ) @@ -19,18 +21,18 @@ import ( // Must use NewLocationSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type LocationSlice struct { - orig *[]otlpprofiles.Location + orig *[]*otlpprofiles.Location state *internal.State } -func newLocationSlice(orig *[]otlpprofiles.Location, state *internal.State) LocationSlice { +func newLocationSlice(orig *[]*otlpprofiles.Location, state *internal.State) LocationSlice { return LocationSlice{orig: orig, state: state} } // NewLocationSlice creates a LocationSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewLocationSlice() LocationSlice { - orig := []otlpprofiles.Location(nil) + orig := []*otlpprofiles.Location(nil) state := internal.StateMutable return newLocationSlice(&orig, &state) } @@ -51,7 +53,7 @@ func (es LocationSlice) Len() int { // ... // Do something with the element // } func (es LocationSlice) At(i int) Location { - return newLocation(&(*es.orig)[i], es.state) + return newLocation((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -73,7 +75,7 @@ func (es LocationSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]otlpprofiles.Location, len(*es.orig), newCap) + newOrig := make([]*otlpprofiles.Location, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -82,7 +84,7 @@ func (es LocationSlice) EnsureCapacity(newCap int) { // It returns the newly added Location. func (es LocationSlice) AppendEmpty() Location { es.state.AssertMutable() - *es.orig = append(*es.orig, otlpprofiles.Location{}) + *es.orig = append(*es.orig, &otlpprofiles.Location{}) return es.At(es.Len() - 1) } @@ -127,10 +129,24 @@ func (es LocationSlice) CopyTo(dest LocationSlice) { destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] - } else { - (*dest.orig) = make([]otlpprofiles.Location, srcLen) + for i := range *es.orig { + newLocation((*es.orig)[i], es.state).CopyTo(newLocation((*dest.orig)[i], dest.state)) + } + return } + origs := make([]otlpprofiles.Location, srcLen) + wrappers := make([]*otlpprofiles.Location, srcLen) for i := range *es.orig { - newLocation(&(*es.orig)[i], es.state).CopyTo(newLocation(&(*dest.orig)[i], dest.state)) + wrappers[i] = &origs[i] + newLocation((*es.orig)[i], es.state).CopyTo(newLocation(wrappers[i], dest.state)) } + *dest.orig = wrappers +} + +// Sort sorts the Location elements within LocationSlice given the +// provided less function so that two instances of LocationSlice +// can be compared. +func (es LocationSlice) Sort(less func(a, b Location) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pprofile/generated_locationslice_test.go b/pdata/pprofile/generated_locationslice_test.go index 06d6946279f..e654bb88a1d 100644 --- a/pdata/pprofile/generated_locationslice_test.go +++ b/pdata/pprofile/generated_locationslice_test.go @@ -8,6 +8,7 @@ package pprofile import ( "testing" + "unsafe" "github.com/stretchr/testify/assert" @@ -19,7 +20,7 @@ func TestLocationSlice(t *testing.T) { es := NewLocationSlice() assert.Equal(t, 0, es.Len()) state := internal.StateMutable - es = newLocationSlice(&[]otlpprofiles.Location{}, &state) + es = newLocationSlice(&[]*otlpprofiles.Location{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewLocation() @@ -35,7 +36,7 @@ func TestLocationSlice(t *testing.T) { func TestLocationSliceReadOnly(t *testing.T) { sharedState := internal.StateReadOnly - es := newLocationSlice(&[]otlpprofiles.Location{}, &sharedState) + es := newLocationSlice(&[]*otlpprofiles.Location{}, &sharedState) assert.Equal(t, 0, es.Len()) assert.Panics(t, func() { es.AppendEmpty() }) assert.Panics(t, func() { es.EnsureCapacity(2) }) @@ -122,6 +123,22 @@ func TestLocationSlice_RemoveIf(t *testing.T) { assert.Equal(t, 5, filtered.Len()) } +func TestLocationSlice_Sort(t *testing.T) { + es := generateTestLocationSlice() + es.Sort(func(a, b Location) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Less(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b Location) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Greater(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + func generateTestLocationSlice() LocationSlice { es := NewLocationSlice() fillTestLocationSlice(es) @@ -129,9 +146,9 @@ func generateTestLocationSlice() LocationSlice { } func fillTestLocationSlice(es LocationSlice) { - *es.orig = make([]otlpprofiles.Location, 7) + *es.orig = make([]*otlpprofiles.Location, 7) for i := 0; i < 7; i++ { - (*es.orig)[i] = otlpprofiles.Location{} - fillTestLocation(newLocation(&(*es.orig)[i], es.state)) + (*es.orig)[i] = &otlpprofiles.Location{} + fillTestLocation(newLocation((*es.orig)[i], es.state)) } } diff --git a/pdata/pprofile/generated_mappingslice.go b/pdata/pprofile/generated_mappingslice.go index cf0f1361483..140d76f4854 100644 --- a/pdata/pprofile/generated_mappingslice.go +++ b/pdata/pprofile/generated_mappingslice.go @@ -7,6 +7,8 @@ package pprofile import ( + "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" ) @@ -19,18 +21,18 @@ import ( // Must use NewMappingSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type MappingSlice struct { - orig *[]otlpprofiles.Mapping + orig *[]*otlpprofiles.Mapping state *internal.State } -func newMappingSlice(orig *[]otlpprofiles.Mapping, state *internal.State) MappingSlice { +func newMappingSlice(orig *[]*otlpprofiles.Mapping, state *internal.State) MappingSlice { return MappingSlice{orig: orig, state: state} } // NewMappingSlice creates a MappingSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewMappingSlice() MappingSlice { - orig := []otlpprofiles.Mapping(nil) + orig := []*otlpprofiles.Mapping(nil) state := internal.StateMutable return newMappingSlice(&orig, &state) } @@ -51,7 +53,7 @@ func (es MappingSlice) Len() int { // ... // Do something with the element // } func (es MappingSlice) At(i int) Mapping { - return newMapping(&(*es.orig)[i], es.state) + return newMapping((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -73,7 +75,7 @@ func (es MappingSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]otlpprofiles.Mapping, len(*es.orig), newCap) + newOrig := make([]*otlpprofiles.Mapping, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -82,7 +84,7 @@ func (es MappingSlice) EnsureCapacity(newCap int) { // It returns the newly added Mapping. func (es MappingSlice) AppendEmpty() Mapping { es.state.AssertMutable() - *es.orig = append(*es.orig, otlpprofiles.Mapping{}) + *es.orig = append(*es.orig, &otlpprofiles.Mapping{}) return es.At(es.Len() - 1) } @@ -127,10 +129,24 @@ func (es MappingSlice) CopyTo(dest MappingSlice) { destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] - } else { - (*dest.orig) = make([]otlpprofiles.Mapping, srcLen) + for i := range *es.orig { + newMapping((*es.orig)[i], es.state).CopyTo(newMapping((*dest.orig)[i], dest.state)) + } + return } + origs := make([]otlpprofiles.Mapping, srcLen) + wrappers := make([]*otlpprofiles.Mapping, srcLen) for i := range *es.orig { - newMapping(&(*es.orig)[i], es.state).CopyTo(newMapping(&(*dest.orig)[i], dest.state)) + wrappers[i] = &origs[i] + newMapping((*es.orig)[i], es.state).CopyTo(newMapping(wrappers[i], dest.state)) } + *dest.orig = wrappers +} + +// Sort sorts the Mapping elements within MappingSlice given the +// provided less function so that two instances of MappingSlice +// can be compared. +func (es MappingSlice) Sort(less func(a, b Mapping) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pprofile/generated_mappingslice_test.go b/pdata/pprofile/generated_mappingslice_test.go index b25cb952ce1..a1c46aa0b9b 100644 --- a/pdata/pprofile/generated_mappingslice_test.go +++ b/pdata/pprofile/generated_mappingslice_test.go @@ -8,6 +8,7 @@ package pprofile import ( "testing" + "unsafe" "github.com/stretchr/testify/assert" @@ -19,7 +20,7 @@ func TestMappingSlice(t *testing.T) { es := NewMappingSlice() assert.Equal(t, 0, es.Len()) state := internal.StateMutable - es = newMappingSlice(&[]otlpprofiles.Mapping{}, &state) + es = newMappingSlice(&[]*otlpprofiles.Mapping{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewMapping() @@ -35,7 +36,7 @@ func TestMappingSlice(t *testing.T) { func TestMappingSliceReadOnly(t *testing.T) { sharedState := internal.StateReadOnly - es := newMappingSlice(&[]otlpprofiles.Mapping{}, &sharedState) + es := newMappingSlice(&[]*otlpprofiles.Mapping{}, &sharedState) assert.Equal(t, 0, es.Len()) assert.Panics(t, func() { es.AppendEmpty() }) assert.Panics(t, func() { es.EnsureCapacity(2) }) @@ -122,6 +123,22 @@ func TestMappingSlice_RemoveIf(t *testing.T) { assert.Equal(t, 5, filtered.Len()) } +func TestMappingSlice_Sort(t *testing.T) { + es := generateTestMappingSlice() + es.Sort(func(a, b Mapping) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Less(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b Mapping) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Greater(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + func generateTestMappingSlice() MappingSlice { es := NewMappingSlice() fillTestMappingSlice(es) @@ -129,9 +146,9 @@ func generateTestMappingSlice() MappingSlice { } func fillTestMappingSlice(es MappingSlice) { - *es.orig = make([]otlpprofiles.Mapping, 7) + *es.orig = make([]*otlpprofiles.Mapping, 7) for i := 0; i < 7; i++ { - (*es.orig)[i] = otlpprofiles.Mapping{} - fillTestMapping(newMapping(&(*es.orig)[i], es.state)) + (*es.orig)[i] = &otlpprofiles.Mapping{} + fillTestMapping(newMapping((*es.orig)[i], es.state)) } } diff --git a/pdata/pprofile/generated_sampleslice.go b/pdata/pprofile/generated_sampleslice.go index da2a128cd6f..64065c10757 100644 --- a/pdata/pprofile/generated_sampleslice.go +++ b/pdata/pprofile/generated_sampleslice.go @@ -7,6 +7,8 @@ package pprofile import ( + "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" ) @@ -19,18 +21,18 @@ import ( // Must use NewSampleSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type SampleSlice struct { - orig *[]otlpprofiles.Sample + orig *[]*otlpprofiles.Sample state *internal.State } -func newSampleSlice(orig *[]otlpprofiles.Sample, state *internal.State) SampleSlice { +func newSampleSlice(orig *[]*otlpprofiles.Sample, state *internal.State) SampleSlice { return SampleSlice{orig: orig, state: state} } // NewSampleSlice creates a SampleSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewSampleSlice() SampleSlice { - orig := []otlpprofiles.Sample(nil) + orig := []*otlpprofiles.Sample(nil) state := internal.StateMutable return newSampleSlice(&orig, &state) } @@ -51,7 +53,7 @@ func (es SampleSlice) Len() int { // ... // Do something with the element // } func (es SampleSlice) At(i int) Sample { - return newSample(&(*es.orig)[i], es.state) + return newSample((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -73,7 +75,7 @@ func (es SampleSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]otlpprofiles.Sample, len(*es.orig), newCap) + newOrig := make([]*otlpprofiles.Sample, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -82,7 +84,7 @@ func (es SampleSlice) EnsureCapacity(newCap int) { // It returns the newly added Sample. func (es SampleSlice) AppendEmpty() Sample { es.state.AssertMutable() - *es.orig = append(*es.orig, otlpprofiles.Sample{}) + *es.orig = append(*es.orig, &otlpprofiles.Sample{}) return es.At(es.Len() - 1) } @@ -127,10 +129,24 @@ func (es SampleSlice) CopyTo(dest SampleSlice) { destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] - } else { - (*dest.orig) = make([]otlpprofiles.Sample, srcLen) + for i := range *es.orig { + newSample((*es.orig)[i], es.state).CopyTo(newSample((*dest.orig)[i], dest.state)) + } + return } + origs := make([]otlpprofiles.Sample, srcLen) + wrappers := make([]*otlpprofiles.Sample, srcLen) for i := range *es.orig { - newSample(&(*es.orig)[i], es.state).CopyTo(newSample(&(*dest.orig)[i], dest.state)) + wrappers[i] = &origs[i] + newSample((*es.orig)[i], es.state).CopyTo(newSample(wrappers[i], dest.state)) } + *dest.orig = wrappers +} + +// Sort sorts the Sample elements within SampleSlice given the +// provided less function so that two instances of SampleSlice +// can be compared. +func (es SampleSlice) Sort(less func(a, b Sample) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pprofile/generated_sampleslice_test.go b/pdata/pprofile/generated_sampleslice_test.go index 7533e51cc45..9c758e0dc02 100644 --- a/pdata/pprofile/generated_sampleslice_test.go +++ b/pdata/pprofile/generated_sampleslice_test.go @@ -8,6 +8,7 @@ package pprofile import ( "testing" + "unsafe" "github.com/stretchr/testify/assert" @@ -19,7 +20,7 @@ func TestSampleSlice(t *testing.T) { es := NewSampleSlice() assert.Equal(t, 0, es.Len()) state := internal.StateMutable - es = newSampleSlice(&[]otlpprofiles.Sample{}, &state) + es = newSampleSlice(&[]*otlpprofiles.Sample{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewSample() @@ -35,7 +36,7 @@ func TestSampleSlice(t *testing.T) { func TestSampleSliceReadOnly(t *testing.T) { sharedState := internal.StateReadOnly - es := newSampleSlice(&[]otlpprofiles.Sample{}, &sharedState) + es := newSampleSlice(&[]*otlpprofiles.Sample{}, &sharedState) assert.Equal(t, 0, es.Len()) assert.Panics(t, func() { es.AppendEmpty() }) assert.Panics(t, func() { es.EnsureCapacity(2) }) @@ -122,6 +123,22 @@ func TestSampleSlice_RemoveIf(t *testing.T) { assert.Equal(t, 5, filtered.Len()) } +func TestSampleSlice_Sort(t *testing.T) { + es := generateTestSampleSlice() + es.Sort(func(a, b Sample) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Less(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b Sample) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Greater(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + func generateTestSampleSlice() SampleSlice { es := NewSampleSlice() fillTestSampleSlice(es) @@ -129,9 +146,9 @@ func generateTestSampleSlice() SampleSlice { } func fillTestSampleSlice(es SampleSlice) { - *es.orig = make([]otlpprofiles.Sample, 7) + *es.orig = make([]*otlpprofiles.Sample, 7) for i := 0; i < 7; i++ { - (*es.orig)[i] = otlpprofiles.Sample{} - fillTestSample(newSample(&(*es.orig)[i], es.state)) + (*es.orig)[i] = &otlpprofiles.Sample{} + fillTestSample(newSample((*es.orig)[i], es.state)) } } diff --git a/pdata/pprofile/generated_valuetypeslice.go b/pdata/pprofile/generated_valuetypeslice.go index 4049bbd2e16..dcbe574a3cc 100644 --- a/pdata/pprofile/generated_valuetypeslice.go +++ b/pdata/pprofile/generated_valuetypeslice.go @@ -7,6 +7,8 @@ package pprofile import ( + "sort" + "go.opentelemetry.io/collector/pdata/internal" otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" ) @@ -19,18 +21,18 @@ import ( // Must use NewValueTypeSlice function to create new instances. // Important: zero-initialized instance is not valid for use. type ValueTypeSlice struct { - orig *[]otlpprofiles.ValueType + orig *[]*otlpprofiles.ValueType state *internal.State } -func newValueTypeSlice(orig *[]otlpprofiles.ValueType, state *internal.State) ValueTypeSlice { +func newValueTypeSlice(orig *[]*otlpprofiles.ValueType, state *internal.State) ValueTypeSlice { return ValueTypeSlice{orig: orig, state: state} } // NewValueTypeSlice creates a ValueTypeSlice with 0 elements. // Can use "EnsureCapacity" to initialize with a given capacity. func NewValueTypeSlice() ValueTypeSlice { - orig := []otlpprofiles.ValueType(nil) + orig := []*otlpprofiles.ValueType(nil) state := internal.StateMutable return newValueTypeSlice(&orig, &state) } @@ -51,7 +53,7 @@ func (es ValueTypeSlice) Len() int { // ... // Do something with the element // } func (es ValueTypeSlice) At(i int) ValueType { - return newValueType(&(*es.orig)[i], es.state) + return newValueType((*es.orig)[i], es.state) } // EnsureCapacity is an operation that ensures the slice has at least the specified capacity. @@ -73,7 +75,7 @@ func (es ValueTypeSlice) EnsureCapacity(newCap int) { return } - newOrig := make([]otlpprofiles.ValueType, len(*es.orig), newCap) + newOrig := make([]*otlpprofiles.ValueType, len(*es.orig), newCap) copy(newOrig, *es.orig) *es.orig = newOrig } @@ -82,7 +84,7 @@ func (es ValueTypeSlice) EnsureCapacity(newCap int) { // It returns the newly added ValueType. func (es ValueTypeSlice) AppendEmpty() ValueType { es.state.AssertMutable() - *es.orig = append(*es.orig, otlpprofiles.ValueType{}) + *es.orig = append(*es.orig, &otlpprofiles.ValueType{}) return es.At(es.Len() - 1) } @@ -127,10 +129,24 @@ func (es ValueTypeSlice) CopyTo(dest ValueTypeSlice) { destCap := cap(*dest.orig) if srcLen <= destCap { (*dest.orig) = (*dest.orig)[:srcLen:destCap] - } else { - (*dest.orig) = make([]otlpprofiles.ValueType, srcLen) + for i := range *es.orig { + newValueType((*es.orig)[i], es.state).CopyTo(newValueType((*dest.orig)[i], dest.state)) + } + return } + origs := make([]otlpprofiles.ValueType, srcLen) + wrappers := make([]*otlpprofiles.ValueType, srcLen) for i := range *es.orig { - newValueType(&(*es.orig)[i], es.state).CopyTo(newValueType(&(*dest.orig)[i], dest.state)) + wrappers[i] = &origs[i] + newValueType((*es.orig)[i], es.state).CopyTo(newValueType(wrappers[i], dest.state)) } + *dest.orig = wrappers +} + +// Sort sorts the ValueType elements within ValueTypeSlice given the +// provided less function so that two instances of ValueTypeSlice +// can be compared. +func (es ValueTypeSlice) Sort(less func(a, b ValueType) bool) { + es.state.AssertMutable() + sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) } diff --git a/pdata/pprofile/generated_valuetypeslice_test.go b/pdata/pprofile/generated_valuetypeslice_test.go index ac4ab1d7dab..79b380a8897 100644 --- a/pdata/pprofile/generated_valuetypeslice_test.go +++ b/pdata/pprofile/generated_valuetypeslice_test.go @@ -8,6 +8,7 @@ package pprofile import ( "testing" + "unsafe" "github.com/stretchr/testify/assert" @@ -19,7 +20,7 @@ func TestValueTypeSlice(t *testing.T) { es := NewValueTypeSlice() assert.Equal(t, 0, es.Len()) state := internal.StateMutable - es = newValueTypeSlice(&[]otlpprofiles.ValueType{}, &state) + es = newValueTypeSlice(&[]*otlpprofiles.ValueType{}, &state) assert.Equal(t, 0, es.Len()) emptyVal := NewValueType() @@ -35,7 +36,7 @@ func TestValueTypeSlice(t *testing.T) { func TestValueTypeSliceReadOnly(t *testing.T) { sharedState := internal.StateReadOnly - es := newValueTypeSlice(&[]otlpprofiles.ValueType{}, &sharedState) + es := newValueTypeSlice(&[]*otlpprofiles.ValueType{}, &sharedState) assert.Equal(t, 0, es.Len()) assert.Panics(t, func() { es.AppendEmpty() }) assert.Panics(t, func() { es.EnsureCapacity(2) }) @@ -122,6 +123,22 @@ func TestValueTypeSlice_RemoveIf(t *testing.T) { assert.Equal(t, 5, filtered.Len()) } +func TestValueTypeSlice_Sort(t *testing.T) { + es := generateTestValueTypeSlice() + es.Sort(func(a, b ValueType) bool { + return uintptr(unsafe.Pointer(a.orig)) < uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Less(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } + es.Sort(func(a, b ValueType) bool { + return uintptr(unsafe.Pointer(a.orig)) > uintptr(unsafe.Pointer(b.orig)) + }) + for i := 1; i < es.Len(); i++ { + assert.Greater(t, uintptr(unsafe.Pointer(es.At(i-1).orig)), uintptr(unsafe.Pointer(es.At(i).orig))) + } +} + func generateTestValueTypeSlice() ValueTypeSlice { es := NewValueTypeSlice() fillTestValueTypeSlice(es) @@ -129,9 +146,9 @@ func generateTestValueTypeSlice() ValueTypeSlice { } func fillTestValueTypeSlice(es ValueTypeSlice) { - *es.orig = make([]otlpprofiles.ValueType, 7) + *es.orig = make([]*otlpprofiles.ValueType, 7) for i := 0; i < 7; i++ { - (*es.orig)[i] = otlpprofiles.ValueType{} - fillTestValueType(newValueType(&(*es.orig)[i], es.state)) + (*es.orig)[i] = &otlpprofiles.ValueType{} + fillTestValueType(newValueType((*es.orig)[i], es.state)) } } diff --git a/pdata/pprofile/profiles_test.go b/pdata/pprofile/profiles_test.go index a03398967c3..1ed16739155 100644 --- a/pdata/pprofile/profiles_test.go +++ b/pdata/pprofile/profiles_test.go @@ -71,7 +71,7 @@ func TestSampleCountWithEmpty(t *testing.T) { Profiles: []*otlpprofile.ProfileContainer{ { Profile: otlpprofile.Profile{ - Sample: []otlpprofile.Sample{ + Sample: []*otlpprofile.Sample{ {}, }, }, diff --git a/proto_patch.sed b/proto_patch.sed index 50cb2f862fa..831f9a6bad2 100644 --- a/proto_patch.sed +++ b/proto_patch.sed @@ -61,32 +61,5 @@ s+bytes profile_id = \(.*\);+bytes profile_id = \1\ (gogoproto.customtype) = "go.opentelemetry.io/collector/pdata/internal/data.ProfileID"\ ];+g -s+repeated ValueType \(.*\);+repeated ValueType \1\ - [ (gogoproto.nullable) = false ];+g - -s+repeated Sample \(.*\);+repeated Sample \1\ - [ (gogoproto.nullable) = false ];+g - -s+repeated Mapping \(.*\);+repeated Mapping \1\ - [ (gogoproto.nullable) = false ];+g - -s+repeated Location \(.*\);+repeated Location \1\ - [ (gogoproto.nullable) = false ];+g - -s+repeated Label \(.*\);+repeated Label \1\ - [ (gogoproto.nullable) = false ];+g - -s+repeated Function \(.*\);+repeated Function \1\ - [ (gogoproto.nullable) = false ];+g - -s+repeated AttributeUnit \(.*\);+repeated AttributeUnit \1\ - [ (gogoproto.nullable) = false ];+g - -s+repeated Link link_table \(.*\);+repeated Link link_table \1\ - [ (gogoproto.nullable) = false ];+g - -s+repeated Line \(.*\);+repeated Line \1\ - [ (gogoproto.nullable) = false ];+g - s+ValueType period_type \(.*\);+ValueType period_type \1\ [ (gogoproto.nullable) = false ];+g From d6cd5935eefcd93eaee1f268f7ab9f2cd65a1f44 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Thu, 3 Oct 2024 23:32:57 -0700 Subject: [PATCH 03/14] Fix data race condition, concurrent writes to the err variable, causes Undefined Behavior (#11349) The main issue is that after https://github.com/open-telemetry/opentelemetry-collector/pull/10910 the err variable is shared between requests because it uses the same address as the err defined outside the func. This is an UB because we are overwriting memory and will cause crashes like https://github.com/open-telemetry/opentelemetry-collector/pull/11335, where the check for not nil happens then gets overwrite with nil and crashes. Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/11350 --------- Signed-off-by: Bogdan Drutu --- .chloggen/fix-ub-proc-helper.yaml | 20 ++++++++++++++ processor/processorhelper/logs.go | 9 ++++--- processor/processorhelper/logs_test.go | 32 ++++++++++++++++++++++ processor/processorhelper/metrics.go | 9 ++++--- processor/processorhelper/metrics_test.go | 31 +++++++++++++++++++++ processor/processorhelper/traces.go | 9 ++++--- processor/processorhelper/traces_test.go | 33 +++++++++++++++++++++++ 7 files changed, 131 insertions(+), 12 deletions(-) create mode 100644 .chloggen/fix-ub-proc-helper.yaml diff --git a/.chloggen/fix-ub-proc-helper.yaml b/.chloggen/fix-ub-proc-helper.yaml new file mode 100644 index 00000000000..cc70e62b9c2 --- /dev/null +++ b/.chloggen/fix-ub-proc-helper.yaml @@ -0,0 +1,20 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: processorhelper + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix data race condition, concurrent writes to the err variable, causes UB (Undefined Behavior) + +# One or more tracking issues or pull requests related to the change +issues: [11350] + +# 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: [user] diff --git a/processor/processorhelper/logs.go b/processor/processorhelper/logs.go index 9ea1e8d40a2..a434fe8fb93 100644 --- a/processor/processorhelper/logs.go +++ b/processor/processorhelper/logs.go @@ -51,13 +51,14 @@ func NewLogs( span.AddEvent("Start processing.", eventOptions) recordsIn := ld.LogRecordCount() - ld, err = logsFunc(ctx, ld) + var errFunc error + ld, errFunc = logsFunc(ctx, ld) span.AddEvent("End processing.", eventOptions) - if err != nil { - if errors.Is(err, ErrSkipProcessingData) { + if errFunc != nil { + if errors.Is(errFunc, ErrSkipProcessingData) { return nil } - return err + return errFunc } recordsOut := ld.LogRecordCount() obs.recordInOut(ctx, recordsIn, recordsOut) diff --git a/processor/processorhelper/logs_test.go b/processor/processorhelper/logs_test.go index e39d5cac2b9..0e94feb2f29 100644 --- a/processor/processorhelper/logs_test.go +++ b/processor/processorhelper/logs_test.go @@ -6,6 +6,7 @@ package processorhelper import ( "context" "errors" + "sync" "testing" "github.com/stretchr/testify/assert" @@ -70,6 +71,37 @@ func newTestLProcessor(retError error) ProcessLogsFunc { } } +func TestLogsConcurrency(t *testing.T) { + logsFunc := func(_ context.Context, ld plog.Logs) (plog.Logs, error) { + return ld, nil + } + + incomingLogs := plog.NewLogs() + incomingLogRecords := incomingLogs.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords() + + // Add 3 records to the incoming + incomingLogRecords.AppendEmpty() + incomingLogRecords.AppendEmpty() + incomingLogRecords.AppendEmpty() + + lp, err := NewLogs(context.Background(), processortest.NewNopSettings(), &testLogsCfg, consumertest.NewNop(), logsFunc) + require.NoError(t, err) + assert.NoError(t, lp.Start(context.Background(), componenttest.NewNopHost())) + + var wg sync.WaitGroup + for i := 0; i < 10; i++ { + wg.Add(1) + go func() { + defer wg.Done() + for j := 0; j < 10000; j++ { + assert.NoError(t, lp.ConsumeLogs(context.Background(), incomingLogs)) + } + }() + } + wg.Wait() + assert.NoError(t, lp.Shutdown(context.Background())) +} + func TestLogs_RecordInOut(t *testing.T) { // Regardless of how many logs are ingested, emit just one mockAggregate := func(_ context.Context, _ plog.Logs) (plog.Logs, error) { diff --git a/processor/processorhelper/metrics.go b/processor/processorhelper/metrics.go index af8a24dd193..c8381fd9589 100644 --- a/processor/processorhelper/metrics.go +++ b/processor/processorhelper/metrics.go @@ -51,13 +51,14 @@ func NewMetrics( span.AddEvent("Start processing.", eventOptions) pointsIn := md.DataPointCount() - md, err = metricsFunc(ctx, md) + var errFunc error + md, errFunc = metricsFunc(ctx, md) span.AddEvent("End processing.", eventOptions) - if err != nil { - if errors.Is(err, ErrSkipProcessingData) { + if errFunc != nil { + if errors.Is(errFunc, ErrSkipProcessingData) { return nil } - return err + return errFunc } pointsOut := md.DataPointCount() obs.recordInOut(ctx, pointsIn, pointsOut) diff --git a/processor/processorhelper/metrics_test.go b/processor/processorhelper/metrics_test.go index 960e0c74f07..0bea27c2c22 100644 --- a/processor/processorhelper/metrics_test.go +++ b/processor/processorhelper/metrics_test.go @@ -6,6 +6,7 @@ package processorhelper import ( "context" "errors" + "sync" "testing" "github.com/stretchr/testify/assert" @@ -70,6 +71,36 @@ func newTestMProcessor(retError error) ProcessMetricsFunc { } } +func TestMetricsConcurrency(t *testing.T) { + metricsFunc := func(_ context.Context, md pmetric.Metrics) (pmetric.Metrics, error) { + return md, nil + } + + incomingMetrics := pmetric.NewMetrics() + dps := incomingMetrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptySum().DataPoints() + + // Add 2 data points to the incoming + dps.AppendEmpty() + dps.AppendEmpty() + + mp, err := NewMetrics(context.Background(), processortest.NewNopSettings(), &testLogsCfg, consumertest.NewNop(), metricsFunc) + require.NoError(t, err) + assert.NoError(t, mp.Start(context.Background(), componenttest.NewNopHost())) + + var wg sync.WaitGroup + for i := 0; i < 10; i++ { + wg.Add(1) + go func() { + defer wg.Done() + for j := 0; j < 10000; j++ { + assert.NoError(t, mp.ConsumeMetrics(context.Background(), incomingMetrics)) + } + }() + } + wg.Wait() + assert.NoError(t, mp.Shutdown(context.Background())) +} + func TestMetrics_RecordInOut(t *testing.T) { // Regardless of how many data points are ingested, emit 3 mockAggregate := func(_ context.Context, _ pmetric.Metrics) (pmetric.Metrics, error) { diff --git a/processor/processorhelper/traces.go b/processor/processorhelper/traces.go index 0891751c7a4..492634541cc 100644 --- a/processor/processorhelper/traces.go +++ b/processor/processorhelper/traces.go @@ -51,13 +51,14 @@ func NewTraces( span.AddEvent("Start processing.", eventOptions) spansIn := td.SpanCount() - td, err = tracesFunc(ctx, td) + var errFunc error + td, errFunc = tracesFunc(ctx, td) span.AddEvent("End processing.", eventOptions) - if err != nil { - if errors.Is(err, ErrSkipProcessingData) { + if errFunc != nil { + if errors.Is(errFunc, ErrSkipProcessingData) { return nil } - return err + return errFunc } spansOut := td.SpanCount() obs.recordInOut(ctx, spansIn, spansOut) diff --git a/processor/processorhelper/traces_test.go b/processor/processorhelper/traces_test.go index db2df7045e6..ecc4f3c9184 100644 --- a/processor/processorhelper/traces_test.go +++ b/processor/processorhelper/traces_test.go @@ -6,6 +6,7 @@ package processorhelper import ( "context" "errors" + "sync" "testing" "github.com/stretchr/testify/assert" @@ -70,6 +71,38 @@ func newTestTProcessor(retError error) ProcessTracesFunc { } } +func TestTracesConcurrency(t *testing.T) { + tracesFunc := func(_ context.Context, td ptrace.Traces) (ptrace.Traces, error) { + return td, nil + } + + incomingTraces := ptrace.NewTraces() + incomingSpans := incomingTraces.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans() + + // Add 4 records to the incoming + incomingSpans.AppendEmpty() + incomingSpans.AppendEmpty() + incomingSpans.AppendEmpty() + incomingSpans.AppendEmpty() + + mp, err := NewTraces(context.Background(), processortest.NewNopSettings(), &testLogsCfg, consumertest.NewNop(), tracesFunc) + require.NoError(t, err) + assert.NoError(t, mp.Start(context.Background(), componenttest.NewNopHost())) + + var wg sync.WaitGroup + for i := 0; i < 10; i++ { + wg.Add(1) + go func() { + defer wg.Done() + for j := 0; j < 10000; j++ { + assert.NoError(t, mp.ConsumeTraces(context.Background(), incomingTraces)) + } + }() + } + wg.Wait() + assert.NoError(t, mp.Shutdown(context.Background())) +} + func TestTraces_RecordInOut(t *testing.T) { // Regardless of how many spans are ingested, emit just one mockAggregate := func(_ context.Context, _ ptrace.Traces) (ptrace.Traces, error) { From 080b76506c5b508f7f017f198e44b076485a69e9 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Fri, 4 Oct 2024 03:12:02 -0500 Subject: [PATCH 04/14] [chore] Prepare release v1.17.0/v0.111.0 (#11353) The following commands were run to prepare this release: - make chlog-update VERSION=v1.17.0/v0.111.0 - make prepare-release PREVIOUS_VERSION=1[.]16[.]0 RELEASE_CANDIDATE=1.17.0 MODSET=stable - make prepare-release PREVIOUS_VERSION=0[.]110[.]0 RELEASE_CANDIDATE=0.111.0 MODSET=beta --------- Co-authored-by: Pablo Baeyens --- .../change-prom-address-to-localhost.yaml | 25 ---- ...componentprofiles-remove-deprecations.yaml | 25 ---- .../componentstatus-continue-rename.yaml | 25 ---- .chloggen/configgrpc-option-refactor.yaml | 29 ----- .chloggen/dep-processorhelper.yaml | 25 ---- .chloggen/deprecate-address.yaml | 20 --- .../deprecate-buildprocessormetricname.yaml | 25 ---- .chloggen/deprecate-processor-name.yaml | 27 ----- .chloggen/deprecate-receiver-name.yaml | 27 ----- .../exporterhelper-remove-deprecated.yaml | 25 ---- .../exportertest-continue-deprecations-2.yaml | 25 ---- .../exportertest-continue-deprecations.yaml | 25 ---- .chloggen/fix-ub-proc-helper.yaml | 20 --- ...jackgopack4-re-add-ocb-version-number.yaml | 25 ---- .../jackgopack4_add-ocb-docker-images.yaml | 25 ---- .chloggen/json-decoded-flag.yaml | 25 ---- .chloggen/msg_fix-snappy-lazy-read.yaml | 25 ---- .chloggen/mx-psi_mark-httpprovider-1.0.yaml | 25 ---- .chloggen/mx-psi_mark-httpsprovider-1.0.yaml | 25 ---- .chloggen/mx-psi_yamlprovider-1.0.yaml | 25 ---- .chloggen/pipeline-continue-refactor.yaml | 25 ---- .chloggen/pprofile-slice-ptrs.yaml | 20 --- .../receivertest-continue-deprecation-2.yaml | 25 ---- .../receivertest-continue-deprecation.yaml | 25 ---- .chloggen/remove-logging-exporter.yaml | 25 ---- .../remove-scraper-with-component-type.yaml | 25 ---- .chloggen/rm-deprecated-func.yaml | 27 ----- .../service-continue-getexporters-rename.yaml | 25 ---- .chloggen/support-time-envvar-expansion.yaml | 26 ---- CHANGELOG-API.md | 39 ++++++ CHANGELOG.md | 31 +++++ Makefile | 2 + client/go.mod | 4 +- cmd/builder/internal/builder/config.go | 2 +- cmd/builder/internal/config/default.yaml | 36 +++--- cmd/builder/test/core.builder.yaml | 8 +- cmd/mdatagen/go.mod | 30 ++--- cmd/otelcorecol/builder-config.yaml | 36 +++--- cmd/otelcorecol/components.go | 22 ++-- cmd/otelcorecol/go.mod | 114 +++++++++--------- cmd/otelcorecol/main.go | 2 +- component/componentprofiles/go.mod | 2 +- component/componentstatus/go.mod | 10 +- component/go.mod | 4 +- config/configauth/go.mod | 10 +- config/configgrpc/go.mod | 28 ++--- config/confighttp/go.mod | 22 ++-- config/configtls/go.mod | 2 +- confmap/converter/expandconverter/go.mod | 2 +- confmap/internal/e2e/go.mod | 2 +- confmap/provider/envprovider/go.mod | 2 +- confmap/provider/fileprovider/go.mod | 2 +- confmap/provider/httpprovider/go.mod | 2 +- confmap/provider/httpsprovider/go.mod | 2 +- confmap/provider/yamlprovider/go.mod | 2 +- connector/connectorprofiles/go.mod | 26 ++-- connector/forwardconnector/go.mod | 28 ++--- connector/go.mod | 26 ++-- consumer/consumerprofiles/go.mod | 6 +- consumer/consumertest/go.mod | 10 +- consumer/go.mod | 6 +- exporter/debugexporter/go.mod | 36 +++--- exporter/exporterprofiles/go.mod | 20 +-- exporter/go.mod | 32 ++--- exporter/nopexporter/go.mod | 28 ++--- exporter/otlpexporter/go.mod | 56 ++++----- exporter/otlphttpexporter/go.mod | 52 ++++---- extension/auth/go.mod | 8 +- extension/experimental/storage/go.mod | 8 +- extension/extensioncapabilities/go.mod | 10 +- extension/go.mod | 6 +- extension/memorylimiterextension/go.mod | 12 +- extension/zpagesextension/go.mod | 34 +++--- filter/go.mod | 2 +- go.mod | 24 ++-- internal/e2e/go.mod | 78 ++++++------ internal/globalgates/go.mod | 2 +- otelcol/go.mod | 56 ++++----- otelcol/otelcoltest/go.mod | 66 +++++----- pdata/pprofile/go.mod | 2 +- pdata/testdata/go.mod | 4 +- pipeline/go.mod | 2 +- processor/batchprocessor/go.mod | 30 ++--- processor/go.mod | 24 ++-- processor/memorylimiterprocessor/go.mod | 30 ++--- processor/processorprofiles/go.mod | 20 +-- receiver/go.mod | 20 +-- receiver/nopreceiver/go.mod | 24 ++-- receiver/otlpreceiver/go.mod | 52 ++++---- receiver/receiverprofiles/go.mod | 20 +-- service/go.mod | 72 +++++------ versions.yaml | 4 +- 92 files changed, 713 insertions(+), 1362 deletions(-) delete mode 100644 .chloggen/change-prom-address-to-localhost.yaml delete mode 100644 .chloggen/componentprofiles-remove-deprecations.yaml delete mode 100644 .chloggen/componentstatus-continue-rename.yaml delete mode 100644 .chloggen/configgrpc-option-refactor.yaml delete mode 100644 .chloggen/dep-processorhelper.yaml delete mode 100644 .chloggen/deprecate-address.yaml delete mode 100644 .chloggen/deprecate-buildprocessormetricname.yaml delete mode 100644 .chloggen/deprecate-processor-name.yaml delete mode 100644 .chloggen/deprecate-receiver-name.yaml delete mode 100644 .chloggen/exporterhelper-remove-deprecated.yaml delete mode 100644 .chloggen/exportertest-continue-deprecations-2.yaml delete mode 100644 .chloggen/exportertest-continue-deprecations.yaml delete mode 100644 .chloggen/fix-ub-proc-helper.yaml delete mode 100644 .chloggen/jackgopack4-re-add-ocb-version-number.yaml delete mode 100644 .chloggen/jackgopack4_add-ocb-docker-images.yaml delete mode 100644 .chloggen/json-decoded-flag.yaml delete mode 100644 .chloggen/msg_fix-snappy-lazy-read.yaml delete mode 100644 .chloggen/mx-psi_mark-httpprovider-1.0.yaml delete mode 100644 .chloggen/mx-psi_mark-httpsprovider-1.0.yaml delete mode 100644 .chloggen/mx-psi_yamlprovider-1.0.yaml delete mode 100644 .chloggen/pipeline-continue-refactor.yaml delete mode 100644 .chloggen/pprofile-slice-ptrs.yaml delete mode 100644 .chloggen/receivertest-continue-deprecation-2.yaml delete mode 100644 .chloggen/receivertest-continue-deprecation.yaml delete mode 100644 .chloggen/remove-logging-exporter.yaml delete mode 100644 .chloggen/remove-scraper-with-component-type.yaml delete mode 100644 .chloggen/rm-deprecated-func.yaml delete mode 100644 .chloggen/service-continue-getexporters-rename.yaml delete mode 100644 .chloggen/support-time-envvar-expansion.yaml diff --git a/.chloggen/change-prom-address-to-localhost.yaml b/.chloggen/change-prom-address-to-localhost.yaml deleted file mode 100644 index 1aa4d229540..00000000000 --- a/.chloggen/change-prom-address-to-localhost.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: 'breaking' - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: service/telemetry - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Change default metrics address to "localhost:8888" instead of ":8888" - -# One or more tracking issues or pull requests related to the change -issues: [11251] - -# (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: This behavior can be disabled by disabling the feature gate 'telemetry.UseLocalHostAsDefaultMetricsAddress'. - -# 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: [user, api] diff --git a/.chloggen/componentprofiles-remove-deprecations.yaml b/.chloggen/componentprofiles-remove-deprecations.yaml deleted file mode 100644 index b251c733f55..00000000000 --- a/.chloggen/componentprofiles-remove-deprecations.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: componentprofiles - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Removed deprecated `DataTypeProfiles`. Use `SignalProfiles` instead. - -# One or more tracking issues or pull requests related to the change -issues: [11312] - -# (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: [api] \ No newline at end of file diff --git a/.chloggen/componentstatus-continue-rename.yaml b/.chloggen/componentstatus-continue-rename.yaml deleted file mode 100644 index abe413843c5..00000000000 --- a/.chloggen/componentstatus-continue-rename.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# 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. otlpreceiver) -component: componentstatus - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Deprecated `NewInstanceIDWithPipelineIDs`, `AllPipelineIDsWithPipelineIDs`, and `WithPipelineIDs`. Use `NewInstanceID`, `AllPipelineIDs`, and `WithPipelines` instead. - -# One or more tracking issues or pull requests related to the change -issues: [11313] - -# (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: [api] \ No newline at end of file diff --git a/.chloggen/configgrpc-option-refactor.yaml b/.chloggen/configgrpc-option-refactor.yaml deleted file mode 100644 index 23191cdc820..00000000000 --- a/.chloggen/configgrpc-option-refactor.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: configgrpc - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Replace ToClientConn and ToServer with ToClientConnWithOptions and ToServerWithOptions. - -# One or more tracking issues or pull requests related to the change -issues: [11271, 9480] - -# (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: | - `ClientConfig.ToClientConn` and `ServerConfig.ToServer` were deprecated in v0.110.0 in favor of - `ClientConfig.ToClientConnWithOptions` and `ServerConfig.ToServerWithOptions` which use a more - flexible option type. The original functions are now removed, and the new ones are renamed to the - old names. The `WithOptions` names are kept as deprecated aliases for now. - -# 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: [api] diff --git a/.chloggen/dep-processorhelper.yaml b/.chloggen/dep-processorhelper.yaml deleted file mode 100644 index 5906e7d8dd8..00000000000 --- a/.chloggen/dep-processorhelper.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# 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. otlpreceiver) -component: processorhelper - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Deprecate unused and empty struct processorhelper.ObsReport - -# One or more tracking issues or pull requests related to the change -issues: [11293] - -# (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: [api] diff --git a/.chloggen/deprecate-address.yaml b/.chloggen/deprecate-address.yaml deleted file mode 100644 index 2ebaab41b54..00000000000 --- a/.chloggen/deprecate-address.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# 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. otlpreceiver) -component: service/telemetry - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Deprecate service::telemetry::metrics::address in favor of service::telemetry::metrics::readers. - -# One or more tracking issues or pull requests related to the change -issues: [11205] - -# 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: [user] diff --git a/.chloggen/deprecate-buildprocessormetricname.yaml b/.chloggen/deprecate-buildprocessormetricname.yaml deleted file mode 100644 index eecce6146dd..00000000000 --- a/.chloggen/deprecate-buildprocessormetricname.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# 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. otlpreceiver) -component: processorhelper - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Deprecate BuildProcessorMetricName as it's no longer needed since introduction of mdatagen - -# One or more tracking issues or pull requests related to the change -issues: [11302] - -# (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/deprecate-processor-name.yaml b/.chloggen/deprecate-processor-name.yaml deleted file mode 100644 index f404361049c..00000000000 --- a/.chloggen/deprecate-processor-name.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# 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. otlpreceiver) -component: processor - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Deprecate funcs that repeat "processor" in name - -# One or more tracking issues or pull requests related to the change -issues: [11310] - -# (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: | - Factory.Create[Traces|Metrics|Logs|Profiles]Processor -> Factory.Create[Traces|Metrics|Logs|Profiles] - Factory.[Traces|Metrics|Logs|Profiles]ProcessorStability -> Factory.[Traces|Metrics|Logs|Profiles]Stability - -# 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: [api] diff --git a/.chloggen/deprecate-receiver-name.yaml b/.chloggen/deprecate-receiver-name.yaml deleted file mode 100644 index fd47163dcc3..00000000000 --- a/.chloggen/deprecate-receiver-name.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# 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. otlpreceiver) -component: receiver - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Deprecate funcs that repeat "receiver" in name - -# One or more tracking issues or pull requests related to the change -issues: [11287] - -# (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: | - Factory.Create[Traces|Metrics|Logs|Profiles]Receiver -> Factory.Create[Traces|Metrics|Logs|Profiles] - Factory.[Traces|Metrics|Logs|Profiles]ReceiverStability -> Factory.[Traces|Metrics|Logs|Profiles]Stability - -# 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: [api] diff --git a/.chloggen/exporterhelper-remove-deprecated.yaml b/.chloggen/exporterhelper-remove-deprecated.yaml deleted file mode 100644 index a025ed3fab3..00000000000 --- a/.chloggen/exporterhelper-remove-deprecated.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: exporterhelper - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Removed deprecated `QueueTimeout`/`TimeoutSettings` aliases in favor of `QueueConfig`/`TimeoutConfig`. - -# One or more tracking issues or pull requests related to the change -issues: [11264, 6767] - -# (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: "`NewDefaultQueueSettings` and `NewDefaultTimeoutSettings` have been similarly renamed." - -# 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: [api] diff --git a/.chloggen/exportertest-continue-deprecations-2.yaml b/.chloggen/exportertest-continue-deprecations-2.yaml deleted file mode 100644 index 3a49dc28dd0..00000000000 --- a/.chloggen/exportertest-continue-deprecations-2.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: exporterqueue - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Remove deprecated `Settings.DataType`. Use `Settings.Signal` instead. - -# One or more tracking issues or pull requests related to the change -issues: [11305] - -# (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: [api] \ No newline at end of file diff --git a/.chloggen/exportertest-continue-deprecations.yaml b/.chloggen/exportertest-continue-deprecations.yaml deleted file mode 100644 index 80b3eb1e723..00000000000 --- a/.chloggen/exportertest-continue-deprecations.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: exportertest - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Remove deprecated `CheckConsumeContractParams.DataType`. Use `CheckConsumeContractParams.Signal` instead. - -# One or more tracking issues or pull requests related to the change -issues: [11305] - -# (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: [api] \ No newline at end of file diff --git a/.chloggen/fix-ub-proc-helper.yaml b/.chloggen/fix-ub-proc-helper.yaml deleted file mode 100644 index cc70e62b9c2..00000000000 --- a/.chloggen/fix-ub-proc-helper.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: processorhelper - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fix data race condition, concurrent writes to the err variable, causes UB (Undefined Behavior) - -# One or more tracking issues or pull requests related to the change -issues: [11350] - -# 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: [user] diff --git a/.chloggen/jackgopack4-re-add-ocb-version-number.yaml b/.chloggen/jackgopack4-re-add-ocb-version-number.yaml deleted file mode 100644 index 1a8bd5595d0..00000000000 --- a/.chloggen/jackgopack4-re-add-ocb-version-number.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: cmd/builder - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: re-adds function to properly set and view version number of OpenTelemetry Collector Builder (ocb) binaries - -# One or more tracking issues or pull requests related to the change -issues: [11208] - -# (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/jackgopack4_add-ocb-docker-images.yaml b/.chloggen/jackgopack4_add-ocb-docker-images.yaml deleted file mode 100644 index ccd8c12fa82..00000000000 --- a/.chloggen/jackgopack4_add-ocb-docker-images.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: ocb - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: create docker images for OCB, per https://github.com/open-telemetry/opentelemetry-collector-releases/pull/671 - -# One or more tracking issues or pull requests related to the change -issues: [ 5712 ] - -# (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: Adds standard Docker images for OCB to Dockerhub and GitHub, see hub.docker.com/r/otel/opentelemetry-collector-builder - -# 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: [ user ] diff --git a/.chloggen/json-decoded-flag.yaml b/.chloggen/json-decoded-flag.yaml deleted file mode 100644 index 05734f7ee31..00000000000 --- a/.chloggen/json-decoded-flag.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: 'bug_fix' - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: 'pdata' - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Unmarshal Span and SpanLink flags from JSON" - -# One or more tracking issues or pull requests related to the change -issues: [11267] - -# (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/msg_fix-snappy-lazy-read.yaml b/.chloggen/msg_fix-snappy-lazy-read.yaml deleted file mode 100644 index 00c037f1528..00000000000 --- a/.chloggen/msg_fix-snappy-lazy-read.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: confighttp - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Snappy compression to lazy read for memory efficiency - -# One or more tracking issues or pull requests related to the change -issues: [11177] - -# (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: [user] diff --git a/.chloggen/mx-psi_mark-httpprovider-1.0.yaml b/.chloggen/mx-psi_mark-httpprovider-1.0.yaml deleted file mode 100644 index 3a7bdef5ae2..00000000000 --- a/.chloggen/mx-psi_mark-httpprovider-1.0.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: httpsprovider - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Mark the httpsprovider as stable. - -# One or more tracking issues or pull requests related to the change -issues: [11191] - -# (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/mx-psi_mark-httpsprovider-1.0.yaml b/.chloggen/mx-psi_mark-httpsprovider-1.0.yaml deleted file mode 100644 index 1214c7e1262..00000000000 --- a/.chloggen/mx-psi_mark-httpsprovider-1.0.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: httpprovider - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Mark the httpprovider as stable. - -# One or more tracking issues or pull requests related to the change -issues: [11191] - -# (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/mx-psi_yamlprovider-1.0.yaml b/.chloggen/mx-psi_yamlprovider-1.0.yaml deleted file mode 100644 index 79c750d97d3..00000000000 --- a/.chloggen/mx-psi_yamlprovider-1.0.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: yamlprovider - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Mark the yamlprovider as stable. - -# One or more tracking issues or pull requests related to the change -issues: [11192] - -# (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/pipeline-continue-refactor.yaml b/.chloggen/pipeline-continue-refactor.yaml deleted file mode 100644 index 915abda7b93..00000000000 --- a/.chloggen/pipeline-continue-refactor.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: component - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Removed deprecated `ErrDataTypeIsNotSupported`, `DataType`, `DataTypeTraces`, `DataTypeMetrics`, and `DataTypeLogs`. Use `pipeline.ErrSignalNotSupported`, `pipeline.Signal`, `pipeline.SignalTraces`, `pipeline.SignalMetrics`, and `pipeline.SignalLogs` instead. - -# One or more tracking issues or pull requests related to the change -issues: [11253] - -# (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: [api] diff --git a/.chloggen/pprofile-slice-ptrs.yaml b/.chloggen/pprofile-slice-ptrs.yaml deleted file mode 100644 index 5c4fcb8eb94..00000000000 --- a/.chloggen/pprofile-slice-ptrs.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: 'breaking' - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: pdata/pprofile - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Replace slices of values to slices of pointers for the `Mapping`, `Location`, `Line`, `Function`, `AttributeUnit`, `Link`, `Value`, `Sample` and `Labels` attributes. - -# One or more tracking issues or pull requests related to the change -issues: [11339] - -# 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: [api] diff --git a/.chloggen/receivertest-continue-deprecation-2.yaml b/.chloggen/receivertest-continue-deprecation-2.yaml deleted file mode 100644 index 98af9c457fc..00000000000 --- a/.chloggen/receivertest-continue-deprecation-2.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# 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. otlpreceiver) -component: receivertest - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Deprecated `NewNopFactoryForTypeWithSignal`. Use `NewNopFactoryForType` instead. - -# One or more tracking issues or pull requests related to the change -issues: [11304] - -# (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: [api] \ No newline at end of file diff --git a/.chloggen/receivertest-continue-deprecation.yaml b/.chloggen/receivertest-continue-deprecation.yaml deleted file mode 100644 index 6adc7bb5054..00000000000 --- a/.chloggen/receivertest-continue-deprecation.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: receivertest - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Remove deprecated `CheckConsumeContractParams.DataType`. Use `CheckConsumeContractParams.Signal` instead. - -# One or more tracking issues or pull requests related to the change -issues: [11304] - -# (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: [api] \ No newline at end of file diff --git a/.chloggen/remove-logging-exporter.yaml b/.chloggen/remove-logging-exporter.yaml deleted file mode 100644 index 9de89981bf1..00000000000 --- a/.chloggen/remove-logging-exporter.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: loggingexporter - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Removed the deprecated logging exporter. Use the debug exporter instead. - -# One or more tracking issues or pull requests related to the change -issues: [11037] - -# (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/remove-scraper-with-component-type.yaml b/.chloggen/remove-scraper-with-component-type.yaml deleted file mode 100644 index dff70acc4a8..00000000000 --- a/.chloggen/remove-scraper-with-component-type.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: scraperhelper - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Remove deprecated function `NewScraperWithComponentType`. - -# One or more tracking issues or pull requests related to the change -issues: [11294] - -# (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: [api] diff --git a/.chloggen/rm-deprecated-func.yaml b/.chloggen/rm-deprecated-func.yaml deleted file mode 100644 index bff8ed69e96..00000000000 --- a/.chloggen/rm-deprecated-func.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: processorhelper - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Remove deprecated funcs form processorhelper.ObsReport - -# One or more tracking issues or pull requests related to the change -issues: [11289] - -# (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: The "otelcol_processor_dropped_log_records", "otelcol_processor_dropped_log_records" | - and "otelcol_processor_dropped_spans" metrics are complete removed, before they were always record with 0 values. - - -# 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: [api] diff --git a/.chloggen/service-continue-getexporters-rename.yaml b/.chloggen/service-continue-getexporters-rename.yaml deleted file mode 100644 index b9f0fd31a97..00000000000 --- a/.chloggen/service-continue-getexporters-rename.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# 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. otlpreceiver) -component: service - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Deprecates `Config.PipelinesWithPipelineID`, `pipelines.ConfigWithPipelineID` and `GetExportersWithSignal` interface implementation. Use `Config.Pipelines`, `pipelines.Config`, and `GetExporters` interface implementation instead. - -# One or more tracking issues or pull requests related to the change -issues: [11303] - -# (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: [api] \ No newline at end of file diff --git a/.chloggen/support-time-envvar-expansion.yaml b/.chloggen/support-time-envvar-expansion.yaml deleted file mode 100644 index c126c2fafee..00000000000 --- a/.chloggen/support-time-envvar-expansion.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Use this changelog template to create an entry for release notes. - -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) -component: confmap - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Allow using any YAML structure as a string when loading configuration including time.Time formats - -# One or more tracking issues or pull requests related to the change -issues: [10659] - -# (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: | - Previously, fields with time.Time formats could not be used as strings in configurations - -# 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/CHANGELOG-API.md b/CHANGELOG-API.md index 4a57ee05a84..fdcac81a500 100644 --- a/CHANGELOG-API.md +++ b/CHANGELOG-API.md @@ -7,6 +7,45 @@ If you are looking for user-facing changes, check out [CHANGELOG.md](./CHANGELOG +## v1.17.0/v0.111.0 + +### 🛑 Breaking changes 🛑 + +- `service/telemetry`: Change default metrics address to "localhost:8888" instead of ":8888" (#11251) + This behavior can be disabled by disabling the feature gate 'telemetry.UseLocalHostAsDefaultMetricsAddress'. +- `componentprofiles`: Removed deprecated `DataTypeProfiles`. Use `SignalProfiles` instead. (#11312) +- `configgrpc`: Replace ToClientConn and ToServer with ToClientConnWithOptions and ToServerWithOptions. (#11271, #9480) + `ClientConfig.ToClientConn` and `ServerConfig.ToServer` were deprecated in v0.110.0 in favor of + `ClientConfig.ToClientConnWithOptions` and `ServerConfig.ToServerWithOptions` which use a more + flexible option type. The original functions are now removed, and the new ones are renamed to the + old names. The `WithOptions` names are kept as deprecated aliases for now. + +- `exporterhelper`: Removed deprecated `QueueTimeout`/`TimeoutSettings` aliases in favor of `QueueConfig`/`TimeoutConfig`. (#11264, #6767) + `NewDefaultQueueSettings` and `NewDefaultTimeoutSettings` have been similarly renamed. +- `exporterqueue`: Remove deprecated `Settings.DataType`. Use `Settings.Signal` instead. (#11305) +- `exportertest`: Remove deprecated `CheckConsumeContractParams.DataType`. Use `CheckConsumeContractParams.Signal` instead. (#11305) +- `component`: Removed deprecated `ErrDataTypeIsNotSupported`, `DataType`, `DataTypeTraces`, `DataTypeMetrics`, and `DataTypeLogs`. Use `pipeline.ErrSignalNotSupported`, `pipeline.Signal`, `pipeline.SignalTraces`, `pipeline.SignalMetrics`, and `pipeline.SignalLogs` instead. (#11253) +- `pdata/pprofile`: Replace slices of values to slices of pointers for the `Mapping`, `Location`, `Line`, `Function`, `AttributeUnit`, `Link`, `Value`, `Sample` and `Labels` attributes. (#11339) +- `receivertest`: Remove deprecated `CheckConsumeContractParams.DataType`. Use `CheckConsumeContractParams.Signal` instead. (#11304) +- `scraperhelper`: Remove deprecated function `NewScraperWithComponentType`. (#11294) +- `processorhelper`: Remove deprecated funcs form processorhelper.ObsReport (#11289) + The "otelcol_processor_dropped_log_records", "otelcol_processor_dropped_log_records" | and "otelcol_processor_dropped_spans" metrics are complete removed, before they were always record with 0 values. + +### 🚩 Deprecations 🚩 + +- `componentstatus`: Deprecated `NewInstanceIDWithPipelineIDs`, `AllPipelineIDsWithPipelineIDs`, and `WithPipelineIDs`. Use `NewInstanceID`, `AllPipelineIDs`, and `WithPipelines` instead. (#11313) +- `processorhelper`: Deprecate unused and empty struct processorhelper.ObsReport (#11293) +- `processor`: Deprecate funcs that repeat "processor" in name (#11310) + Factory.Create[Traces|Metrics|Logs|Profiles]Processor -> Factory.Create[Traces|Metrics|Logs|Profiles] + Factory.[Traces|Metrics|Logs|Profiles]ProcessorStability -> Factory.[Traces|Metrics|Logs|Profiles]Stability + +- `receiver`: Deprecate funcs that repeat "receiver" in name (#11287) + Factory.Create[Traces|Metrics|Logs|Profiles]Receiver -> Factory.Create[Traces|Metrics|Logs|Profiles] + Factory.[Traces|Metrics|Logs|Profiles]ReceiverStability -> Factory.[Traces|Metrics|Logs|Profiles]Stability + +- `receivertest`: Deprecated `NewNopFactoryForTypeWithSignal`. Use `NewNopFactoryForType` instead. (#11304) +- `service`: Deprecates `Config.PipelinesWithPipelineID`, `pipelines.ConfigWithPipelineID` and `GetExportersWithSignal` interface implementation. Use `Config.Pipelines`, `pipelines.Config`, and `GetExporters` interface implementation instead. (#11303) + ## v1.16.0/v0.110.0 ### 🛑 Breaking changes 🛑 diff --git a/CHANGELOG.md b/CHANGELOG.md index fc4a2de994f..55d6aad753f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,37 @@ If you are looking for developer-facing changes, check out [CHANGELOG-API.md](./ +## v1.17.0/v0.111.0 + +### 🛑 Breaking changes 🛑 + +- `service/telemetry`: Change default metrics address to "localhost:8888" instead of ":8888" (#11251) + This behavior can be disabled by disabling the feature gate 'telemetry.UseLocalHostAsDefaultMetricsAddress'. +- `loggingexporter`: Removed the deprecated logging exporter. Use the debug exporter instead. (#11037) + +### 🚩 Deprecations 🚩 + +- `service/telemetry`: Deprecate service::telemetry::metrics::address in favor of service::telemetry::metrics::readers. (#11205) +- `processorhelper`: Deprecate BuildProcessorMetricName as it's no longer needed since introduction of mdatagen (#11302) + +### 💡 Enhancements 💡 + +- `ocb`: create docker images for OCB, per https://github.com/open-telemetry/opentelemetry-collector-releases/pull/671 (#5712) + Adds standard Docker images for OCB to Dockerhub and GitHub, see hub.docker.com/r/otel/opentelemetry-collector-builder +- `confighttp`: Snappy compression to lazy read for memory efficiency (#11177) +- `httpsprovider`: Mark the httpsprovider as stable. (#11191) +- `httpprovider`: Mark the httpprovider as stable. (#11191) +- `yamlprovider`: Mark the yamlprovider as stable. (#11192) +- `confmap`: Allow using any YAML structure as a string when loading configuration including time.Time formats (#10659) + Previously, fields with time.Time formats could not be used as strings in configurations + + +### 🧰 Bug fixes 🧰 + +- `processorhelper`: Fix data race condition, concurrent writes to the err variable, causes UB (Undefined Behavior) (#11350) +- `cmd/builder`: re-adds function to properly set and view version number of OpenTelemetry Collector Builder (ocb) binaries (#11208) +- `pdata`: Unmarshal Span and SpanLink flags from JSON (#11267) + ## v1.16.0/v0.110.0 ### 🛑 Breaking changes 🛑 diff --git a/Makefile b/Makefile index 62f1e6c0d36..210b4a7c455 100644 --- a/Makefile +++ b/Makefile @@ -302,6 +302,7 @@ check-contrib: -replace go.opentelemetry.io/collector/extension/memorylimiterextension=$(CURDIR)/extension/memorylimiterextension \ -replace go.opentelemetry.io/collector/extension/zpagesextension=$(CURDIR)/extension/zpagesextension \ -replace go.opentelemetry.io/collector/featuregate=$(CURDIR)/featuregate \ + -replace go.opentelemetry.io/collector/filter=$(CURDIR)/filter \ -replace go.opentelemetry.io/collector/internal/globalgates=$(CURDIR)/internal/globalgates \ -replace go.opentelemetry.io/collector/internal/globalsignal=$(CURDIR)/internal/globalsignal \ -replace go.opentelemetry.io/collector/otelcol=$(CURDIR)/otelcol \ @@ -370,6 +371,7 @@ restore-contrib: -dropreplace go.opentelemetry.io/collector/extension/memorylimiterextension \ -dropreplace go.opentelemetry.io/collector/extension/zpagesextension \ -dropreplace go.opentelemetry.io/collector/featuregate \ + -dropreplace go.opentelemetry.io/collector/filter \ -dropreplace go.opentelemetry.io/collector/internal/globalgates \ -dropreplace go.opentelemetry.io/collector/internal/globalsignal \ -dropreplace go.opentelemetry.io/collector/otelcol \ diff --git a/client/go.mod b/client/go.mod index 0aa61989068..2069bc89571 100644 --- a/client/go.mod +++ b/client/go.mod @@ -4,8 +4,8 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 go.uber.org/goleak v1.3.0 ) diff --git a/cmd/builder/internal/builder/config.go b/cmd/builder/internal/builder/config.go index d92806bac28..612aa0ca8d9 100644 --- a/cmd/builder/internal/builder/config.go +++ b/cmd/builder/internal/builder/config.go @@ -17,7 +17,7 @@ import ( "go.uber.org/zap" ) -const defaultOtelColVersion = "0.110.0" +const defaultOtelColVersion = "0.111.0" // ErrMissingGoMod indicates an empty gomod field var ErrMissingGoMod = errors.New("missing gomod specification for module") diff --git a/cmd/builder/internal/config/default.yaml b/cmd/builder/internal/config/default.yaml index 3e3f2483d70..ed9898a613d 100644 --- a/cmd/builder/internal/config/default.yaml +++ b/cmd/builder/internal/config/default.yaml @@ -10,30 +10,30 @@ dist: module: go.opentelemetry.io/collector/cmd/otelcorecol name: otelcorecol description: Local OpenTelemetry Collector binary, testing only. - version: 0.110.0-dev - otelcol_version: 0.110.0 + version: 0.111.0-dev + otelcol_version: 0.111.0 receivers: - - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.110.0 - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0 + - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.111.0 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.111.0 exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.110.0 - - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.110.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.110.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.110.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.111.0 + - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.111.0 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.111.0 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.111.0 extensions: - - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.110.0 - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.110.0 + - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.111.0 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.111.0 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.110.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.110.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.111.0 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.111.0 connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.110.0 + - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.111.0 providers: - - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.16.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.16.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.110.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.110.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.110.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.17.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.17.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.111.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.111.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.111.0 diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index b9b7b03166b..f00dff95596 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -1,15 +1,15 @@ dist: module: go.opentelemetry.io/collector/builder/test/core - otelcol_version: 0.110.0 + otelcol_version: 0.111.0 extensions: - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.110.0 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.111.0 receivers: - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.111.0 exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.110.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.111.0 replaces: - go.opentelemetry.io/collector => ${WORKSPACE_DIR} diff --git a/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod index fe34461c008..ae99b74fae3 100644 --- a/cmd/mdatagen/go.mod +++ b/cmd/mdatagen/go.mod @@ -6,16 +6,16 @@ require ( github.com/google/go-cmp v0.6.0 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v1.16.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/filter v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/receiver v0.110.0 - go.opentelemetry.io/collector/semconv v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v1.17.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/filter v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/receiver v0.111.0 + go.opentelemetry.io/collector/semconv v0.111.0 go.opentelemetry.io/otel/metric v1.30.0 go.opentelemetry.io/otel/sdk/metric v1.30.0 go.opentelemetry.io/otel/trace v1.30.0 @@ -42,11 +42,11 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect go.uber.org/multierr v1.11.0 // indirect diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index defb0612a0c..1511a32f9f2 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -10,32 +10,32 @@ dist: module: go.opentelemetry.io/collector/cmd/otelcorecol name: otelcorecol description: Local OpenTelemetry Collector binary, testing only. - version: 0.110.0-dev - otelcol_version: 0.110.0 + version: 0.111.0-dev + otelcol_version: 0.111.0 receivers: - - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.110.0 - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0 + - gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.111.0 + - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.111.0 exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.110.0 - - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.110.0 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.110.0 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.110.0 + - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.111.0 + - gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.111.0 + - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.111.0 + - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.111.0 extensions: - - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.110.0 - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.110.0 + - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.111.0 + - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.111.0 processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.110.0 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.110.0 + - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.111.0 + - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.111.0 connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.110.0 + - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.111.0 providers: - - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.16.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.16.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.110.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.110.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.110.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.17.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.17.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.111.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.111.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.111.0 replaces: - go.opentelemetry.io/collector => ../../ diff --git a/cmd/otelcorecol/components.go b/cmd/otelcorecol/components.go index c5901f2beef..e35b7c37ba5 100644 --- a/cmd/otelcorecol/components.go +++ b/cmd/otelcorecol/components.go @@ -35,8 +35,8 @@ func components() (otelcol.Factories, error) { return otelcol.Factories{}, err } factories.ExtensionModules = make(map[component.Type]string, len(factories.Extensions)) - factories.ExtensionModules[memorylimiterextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/memorylimiterextension v0.110.0" - factories.ExtensionModules[zpagesextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/zpagesextension v0.110.0" + factories.ExtensionModules[memorylimiterextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/memorylimiterextension v0.111.0" + factories.ExtensionModules[zpagesextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/zpagesextension v0.111.0" factories.Receivers, err = receiver.MakeFactoryMap( nopreceiver.NewFactory(), @@ -46,8 +46,8 @@ func components() (otelcol.Factories, error) { return otelcol.Factories{}, err } factories.ReceiverModules = make(map[component.Type]string, len(factories.Receivers)) - factories.ReceiverModules[nopreceiver.NewFactory().Type()] = "go.opentelemetry.io/collector/receiver/nopreceiver v0.110.0" - factories.ReceiverModules[otlpreceiver.NewFactory().Type()] = "go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0" + factories.ReceiverModules[nopreceiver.NewFactory().Type()] = "go.opentelemetry.io/collector/receiver/nopreceiver v0.111.0" + factories.ReceiverModules[otlpreceiver.NewFactory().Type()] = "go.opentelemetry.io/collector/receiver/otlpreceiver v0.111.0" factories.Exporters, err = exporter.MakeFactoryMap( debugexporter.NewFactory(), @@ -59,10 +59,10 @@ func components() (otelcol.Factories, error) { return otelcol.Factories{}, err } factories.ExporterModules = make(map[component.Type]string, len(factories.Exporters)) - factories.ExporterModules[debugexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/debugexporter v0.110.0" - factories.ExporterModules[nopexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/nopexporter v0.110.0" - factories.ExporterModules[otlpexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/otlpexporter v0.110.0" - factories.ExporterModules[otlphttpexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/otlphttpexporter v0.110.0" + factories.ExporterModules[debugexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/debugexporter v0.111.0" + factories.ExporterModules[nopexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/nopexporter v0.111.0" + factories.ExporterModules[otlpexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/otlpexporter v0.111.0" + factories.ExporterModules[otlphttpexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/otlphttpexporter v0.111.0" factories.Processors, err = processor.MakeFactoryMap( batchprocessor.NewFactory(), @@ -72,8 +72,8 @@ func components() (otelcol.Factories, error) { return otelcol.Factories{}, err } factories.ProcessorModules = make(map[component.Type]string, len(factories.Processors)) - factories.ProcessorModules[batchprocessor.NewFactory().Type()] = "go.opentelemetry.io/collector/processor/batchprocessor v0.110.0" - factories.ProcessorModules[memorylimiterprocessor.NewFactory().Type()] = "go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.110.0" + factories.ProcessorModules[batchprocessor.NewFactory().Type()] = "go.opentelemetry.io/collector/processor/batchprocessor v0.111.0" + factories.ProcessorModules[memorylimiterprocessor.NewFactory().Type()] = "go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.111.0" factories.Connectors, err = connector.MakeFactoryMap( forwardconnector.NewFactory(), @@ -82,7 +82,7 @@ func components() (otelcol.Factories, error) { return otelcol.Factories{}, err } factories.ConnectorModules = make(map[component.Type]string, len(factories.Connectors)) - factories.ConnectorModules[forwardconnector.NewFactory().Type()] = "go.opentelemetry.io/collector/connector/forwardconnector v0.110.0" + factories.ConnectorModules[forwardconnector.NewFactory().Type()] = "go.opentelemetry.io/collector/connector/forwardconnector v0.111.0" return factories, nil } diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index 61b81db4e04..70ded5923bd 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -7,30 +7,30 @@ go 1.22.0 toolchain go1.22.7 require ( - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/confmap/provider/envprovider v1.16.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v1.16.0 - go.opentelemetry.io/collector/confmap/provider/httpprovider v0.110.0 - go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.110.0 - go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.110.0 - go.opentelemetry.io/collector/connector v0.110.0 - go.opentelemetry.io/collector/connector/forwardconnector v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/exporter/debugexporter v0.110.0 - go.opentelemetry.io/collector/exporter/nopexporter v0.110.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.110.0 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.110.0 - go.opentelemetry.io/collector/extension v0.110.0 - go.opentelemetry.io/collector/extension/memorylimiterextension v0.110.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.110.0 - go.opentelemetry.io/collector/otelcol v0.110.0 - go.opentelemetry.io/collector/processor v0.110.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.110.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.110.0 - go.opentelemetry.io/collector/receiver v0.110.0 - go.opentelemetry.io/collector/receiver/nopreceiver v0.110.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/confmap/provider/envprovider v1.17.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v1.17.0 + go.opentelemetry.io/collector/confmap/provider/httpprovider v0.111.0 + go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.111.0 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.111.0 + go.opentelemetry.io/collector/connector v0.111.0 + go.opentelemetry.io/collector/connector/forwardconnector v0.111.0 + go.opentelemetry.io/collector/exporter v0.111.0 + go.opentelemetry.io/collector/exporter/debugexporter v0.111.0 + go.opentelemetry.io/collector/exporter/nopexporter v0.111.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.111.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.111.0 + go.opentelemetry.io/collector/extension v0.111.0 + go.opentelemetry.io/collector/extension/memorylimiterextension v0.111.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.111.0 + go.opentelemetry.io/collector/otelcol v0.111.0 + go.opentelemetry.io/collector/processor v0.111.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.111.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.111.0 + go.opentelemetry.io/collector/receiver v0.111.0 + go.opentelemetry.io/collector/receiver/nopreceiver v0.111.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.111.0 golang.org/x/sys v0.25.0 ) @@ -78,39 +78,39 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector v0.110.0 // indirect - go.opentelemetry.io/collector/client v1.16.0 // indirect - go.opentelemetry.io/collector/component/componentprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/component/componentstatus v0.110.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.110.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.16.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.110.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.110.0 // indirect - go.opentelemetry.io/collector/config/confignet v1.16.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.16.0 // indirect - go.opentelemetry.io/collector/config/configretry v1.16.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/config/configtls v1.16.0 // indirect - go.opentelemetry.io/collector/config/internal v0.110.0 // indirect - go.opentelemetry.io/collector/connector/connectorprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.110.0 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.110.0 // indirect - go.opentelemetry.io/collector/extension/extensioncapabilities v0.110.0 // indirect - go.opentelemetry.io/collector/featuregate v1.16.0 // indirect - go.opentelemetry.io/collector/internal/globalgates v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/semconv v0.110.0 // indirect - go.opentelemetry.io/collector/service v0.110.0 // indirect + go.opentelemetry.io/collector v0.111.0 // indirect + go.opentelemetry.io/collector/client v1.17.0 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/component/componentstatus v0.111.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.111.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.17.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.111.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.111.0 // indirect + go.opentelemetry.io/collector/config/confignet v1.17.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.17.0 // indirect + go.opentelemetry.io/collector/config/configretry v1.17.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/config/configtls v1.17.0 // indirect + go.opentelemetry.io/collector/config/internal v0.111.0 // indirect + go.opentelemetry.io/collector/connector/connectorprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 // indirect + go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.111.0 // indirect + go.opentelemetry.io/collector/extension/experimental/storage v0.111.0 // indirect + go.opentelemetry.io/collector/extension/extensioncapabilities v0.111.0 // indirect + go.opentelemetry.io/collector/featuregate v1.17.0 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.111.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect + go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/semconv v0.111.0 // indirect + go.opentelemetry.io/collector/service v0.111.0 // indirect go.opentelemetry.io/contrib/config v0.10.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect diff --git a/cmd/otelcorecol/main.go b/cmd/otelcorecol/main.go index 786be8ced3d..b0b3972fd0d 100644 --- a/cmd/otelcorecol/main.go +++ b/cmd/otelcorecol/main.go @@ -20,7 +20,7 @@ func main() { info := component.BuildInfo{ Command: "otelcorecol", Description: "Local OpenTelemetry Collector binary, testing only.", - Version: "0.110.0-dev", + Version: "0.111.0-dev", } set := otelcol.CollectorSettings{ diff --git a/component/componentprofiles/go.mod b/component/componentprofiles/go.mod index 1812c6b7713..2f7410b0dc8 100644 --- a/component/componentprofiles/go.mod +++ b/component/componentprofiles/go.mod @@ -2,6 +2,6 @@ module go.opentelemetry.io/collector/component/componentprofiles go 1.22.0 -require go.opentelemetry.io/collector/internal/globalsignal v0.110.0 +require go.opentelemetry.io/collector/internal/globalsignal v0.111.0 replace go.opentelemetry.io/collector/internal/globalsignal => ../../internal/globalsignal diff --git a/component/componentstatus/go.mod b/component/componentstatus/go.mod index b6471d21768..ccebbcac1dc 100644 --- a/component/componentstatus/go.mod +++ b/component/componentstatus/go.mod @@ -4,17 +4,17 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/trace v1.30.0 // indirect diff --git a/component/go.mod b/component/go.mod index d2f54d1e34c..0159f04e8f2 100644 --- a/component/go.mod +++ b/component/go.mod @@ -4,8 +4,8 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 go.opentelemetry.io/otel v1.30.0 go.opentelemetry.io/otel/metric v1.30.0 go.opentelemetry.io/otel/sdk v1.30.0 diff --git a/config/configauth/go.mod b/config/configauth/go.mod index dd0ea7f391d..9f44b8bf26a 100644 --- a/config/configauth/go.mod +++ b/config/configauth/go.mod @@ -4,9 +4,9 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/extension v0.110.0 - go.opentelemetry.io/collector/extension/auth v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/extension v0.111.0 + go.opentelemetry.io/collector/extension/auth v0.111.0 go.uber.org/goleak v1.3.0 ) @@ -14,8 +14,8 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/trace v1.30.0 // indirect diff --git a/config/configgrpc/go.mod b/config/configgrpc/go.mod index 17d4b5b23c1..eee5680290a 100644 --- a/config/configgrpc/go.mod +++ b/config/configgrpc/go.mod @@ -5,18 +5,18 @@ go 1.22.0 require ( github.com/mostynb/go-grpc-compression v1.2.3 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/client v1.16.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configauth v0.110.0 - go.opentelemetry.io/collector/config/configcompression v1.16.0 - go.opentelemetry.io/collector/config/confignet v1.16.0 - go.opentelemetry.io/collector/config/configopaque v1.16.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/config/configtls v1.16.0 - go.opentelemetry.io/collector/config/internal v0.110.0 - go.opentelemetry.io/collector/extension/auth v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 + go.opentelemetry.io/collector/client v1.17.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/config/configauth v0.111.0 + go.opentelemetry.io/collector/config/configcompression v1.17.0 + go.opentelemetry.io/collector/config/confignet v1.17.0 + go.opentelemetry.io/collector/config/configopaque v1.17.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/config/configtls v1.17.0 + go.opentelemetry.io/collector/config/internal v0.111.0 + go.opentelemetry.io/collector/extension/auth v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 go.opentelemetry.io/otel v1.30.0 go.uber.org/goleak v1.3.0 @@ -37,8 +37,8 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/extension v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect + go.opentelemetry.io/collector/extension v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.30.0 // indirect diff --git a/config/confighttp/go.mod b/config/confighttp/go.mod index 9874f60d470..118bf4931e7 100644 --- a/config/confighttp/go.mod +++ b/config/confighttp/go.mod @@ -7,15 +7,15 @@ require ( github.com/klauspost/compress v1.17.10 github.com/rs/cors v1.11.1 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/client v1.16.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configauth v0.110.0 - go.opentelemetry.io/collector/config/configcompression v1.16.0 - go.opentelemetry.io/collector/config/configopaque v1.16.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/config/configtls v1.16.0 - go.opentelemetry.io/collector/config/internal v0.110.0 - go.opentelemetry.io/collector/extension/auth v0.110.0 + go.opentelemetry.io/collector/client v1.17.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/config/configauth v0.111.0 + go.opentelemetry.io/collector/config/configcompression v1.17.0 + go.opentelemetry.io/collector/config/configopaque v1.17.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/config/configtls v1.17.0 + go.opentelemetry.io/collector/config/internal v0.111.0 + go.opentelemetry.io/collector/extension/auth v0.111.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 go.opentelemetry.io/otel v1.30.0 go.opentelemetry.io/otel/metric v1.30.0 @@ -33,8 +33,8 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/extension v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/extension v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.30.0 // indirect go.opentelemetry.io/otel/trace v1.30.0 // indirect diff --git a/config/configtls/go.mod b/config/configtls/go.mod index a9f43eea758..a8f662cb9c9 100644 --- a/config/configtls/go.mod +++ b/config/configtls/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/fsnotify/fsnotify v1.7.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/config/configopaque v1.16.0 + go.opentelemetry.io/collector/config/configopaque v1.17.0 ) require ( diff --git a/confmap/converter/expandconverter/go.mod b/confmap/converter/expandconverter/go.mod index 4bbbb70215f..d8f55df1d14 100644 --- a/confmap/converter/expandconverter/go.mod +++ b/confmap/converter/expandconverter/go.mod @@ -6,7 +6,7 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v1.16.0 + go.opentelemetry.io/collector/confmap v1.17.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) diff --git a/confmap/internal/e2e/go.mod b/confmap/internal/e2e/go.mod index ea8fba82422..dc31a65000a 100644 --- a/confmap/internal/e2e/go.mod +++ b/confmap/internal/e2e/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/config/configopaque v1.16.0 - go.opentelemetry.io/collector/confmap v1.16.0 + go.opentelemetry.io/collector/confmap v1.17.0 go.opentelemetry.io/collector/confmap/provider/envprovider v1.16.0 go.opentelemetry.io/collector/confmap/provider/fileprovider v1.16.0 ) diff --git a/confmap/provider/envprovider/go.mod b/confmap/provider/envprovider/go.mod index 5f37650647c..ddbe317641b 100644 --- a/confmap/provider/envprovider/go.mod +++ b/confmap/provider/envprovider/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v1.16.0 + go.opentelemetry.io/collector/confmap v1.17.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) diff --git a/confmap/provider/fileprovider/go.mod b/confmap/provider/fileprovider/go.mod index 7aa1090b9c6..9a98f83a00e 100644 --- a/confmap/provider/fileprovider/go.mod +++ b/confmap/provider/fileprovider/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v1.16.0 + go.opentelemetry.io/collector/confmap v1.17.0 go.uber.org/goleak v1.3.0 ) diff --git a/confmap/provider/httpprovider/go.mod b/confmap/provider/httpprovider/go.mod index 5292c64364b..cae8da3f9fe 100644 --- a/confmap/provider/httpprovider/go.mod +++ b/confmap/provider/httpprovider/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v1.16.0 + go.opentelemetry.io/collector/confmap v1.17.0 go.uber.org/goleak v1.3.0 ) diff --git a/confmap/provider/httpsprovider/go.mod b/confmap/provider/httpsprovider/go.mod index ef6786dcf0f..e2400a3f601 100644 --- a/confmap/provider/httpsprovider/go.mod +++ b/confmap/provider/httpsprovider/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v1.16.0 + go.opentelemetry.io/collector/confmap v1.17.0 go.uber.org/goleak v1.3.0 ) diff --git a/confmap/provider/yamlprovider/go.mod b/confmap/provider/yamlprovider/go.mod index 6d9c8d07c93..f905dfec448 100644 --- a/confmap/provider/yamlprovider/go.mod +++ b/confmap/provider/yamlprovider/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v1.16.0 + go.opentelemetry.io/collector/confmap v1.17.0 go.uber.org/goleak v1.3.0 ) diff --git a/connector/connectorprofiles/go.mod b/connector/connectorprofiles/go.mod index bc6c9169db5..9f3a77bb3c1 100644 --- a/connector/connectorprofiles/go.mod +++ b/connector/connectorprofiles/go.mod @@ -4,16 +4,16 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.110.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/component/componentprofiles v0.110.0 - go.opentelemetry.io/collector/connector v0.110.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 + go.opentelemetry.io/collector v0.111.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/component/componentprofiles v0.111.0 + go.opentelemetry.io/collector/connector v0.111.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 ) require ( @@ -23,9 +23,9 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/trace v1.30.0 // indirect diff --git a/connector/forwardconnector/go.mod b/connector/forwardconnector/go.mod index 9b50f65b74f..90eddc6778f 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -4,13 +4,13 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/connector v0.110.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pipeline v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/connector v0.111.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pipeline v0.111.0 go.uber.org/goleak v1.3.0 ) @@ -30,13 +30,13 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector v0.110.0 // indirect - go.opentelemetry.io/collector/component/componentprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/connector/connectorprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect + go.opentelemetry.io/collector v0.111.0 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/connector/connectorprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect diff --git a/connector/go.mod b/connector/go.mod index 6878422a98e..b191fad424a 100644 --- a/connector/go.mod +++ b/connector/go.mod @@ -5,16 +5,16 @@ go 1.22.0 require ( github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.110.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/connector/connectorprofiles v0.110.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 + go.opentelemetry.io/collector v0.111.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/connector/connectorprofiles v0.111.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 ) @@ -28,9 +28,9 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/component/componentprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect diff --git a/consumer/consumerprofiles/go.mod b/consumer/consumerprofiles/go.mod index c9d5795bcca..cad5919cb9b 100644 --- a/consumer/consumerprofiles/go.mod +++ b/consumer/consumerprofiles/go.mod @@ -10,8 +10,8 @@ replace go.opentelemetry.io/collector/consumer => ../ require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 ) require ( @@ -21,7 +21,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/net v0.28.0 // indirect golang.org/x/sys v0.24.0 // indirect diff --git a/consumer/consumertest/go.mod b/consumer/consumertest/go.mod index b20c55967ec..daec40b26c8 100644 --- a/consumer/consumertest/go.mod +++ b/consumer/consumertest/go.mod @@ -6,11 +6,11 @@ replace go.opentelemetry.io/collector/consumer => ../ require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 go.uber.org/goleak v1.3.0 ) diff --git a/consumer/go.mod b/consumer/go.mod index 743822a880b..cc539cd95f4 100644 --- a/consumer/go.mod +++ b/consumer/go.mod @@ -4,8 +4,8 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 go.uber.org/goleak v1.3.0 ) @@ -16,7 +16,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/net v0.28.0 // indirect golang.org/x/sys v0.24.0 // indirect diff --git a/exporter/debugexporter/go.mod b/exporter/debugexporter/go.mod index d05801657dd..d8e04087295 100644 --- a/exporter/debugexporter/go.mod +++ b/exporter/debugexporter/go.mod @@ -4,13 +4,13 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/exporter v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -32,17 +32,17 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configretry v1.16.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/extension v0.110.0 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect - go.opentelemetry.io/collector/receiver v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect + go.opentelemetry.io/collector/config/configretry v1.17.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 // indirect + go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/extension v0.111.0 // indirect + go.opentelemetry.io/collector/extension/experimental/storage v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect + go.opentelemetry.io/collector/receiver v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect diff --git a/exporter/exporterprofiles/go.mod b/exporter/exporterprofiles/go.mod index 4da19ee67ec..6b52dd3a78d 100644 --- a/exporter/exporterprofiles/go.mod +++ b/exporter/exporterprofiles/go.mod @@ -4,11 +4,11 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/exporter v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 ) require ( @@ -18,11 +18,11 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/consumer v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/consumer v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/trace v1.30.0 // indirect diff --git a/exporter/go.mod b/exporter/go.mod index 6e96152b30f..0229b0c1709 100644 --- a/exporter/go.mod +++ b/exporter/go.mod @@ -6,19 +6,19 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configretry v1.16.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 - go.opentelemetry.io/collector/extension v0.110.0 - go.opentelemetry.io/collector/extension/experimental/storage v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 - go.opentelemetry.io/collector/receiver v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/config/configretry v1.17.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 + go.opentelemetry.io/collector/extension v0.111.0 + go.opentelemetry.io/collector/extension/experimental/storage v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 + go.opentelemetry.io/collector/receiver v0.111.0 go.opentelemetry.io/otel v1.30.0 go.opentelemetry.io/otel/metric v1.30.0 go.opentelemetry.io/otel/sdk v1.30.0 @@ -40,9 +40,9 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect golang.org/x/net v0.28.0 // indirect golang.org/x/text v0.17.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect diff --git a/exporter/nopexporter/go.mod b/exporter/nopexporter/go.mod index 31c1062436a..6812cc14266 100644 --- a/exporter/nopexporter/go.mod +++ b/exporter/nopexporter/go.mod @@ -4,11 +4,11 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/exporter v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 go.uber.org/goleak v1.3.0 ) @@ -28,15 +28,15 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/consumer v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect - go.opentelemetry.io/collector/receiver v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/consumer v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect + go.opentelemetry.io/collector/receiver v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect diff --git a/exporter/otlpexporter/go.mod b/exporter/otlpexporter/go.mod index ec8baab7213..89853601b55 100644 --- a/exporter/otlpexporter/go.mod +++ b/exporter/otlpexporter/go.mod @@ -4,19 +4,19 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.110.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configauth v0.110.0 - go.opentelemetry.io/collector/config/configcompression v1.16.0 - go.opentelemetry.io/collector/config/configgrpc v0.110.0 - go.opentelemetry.io/collector/config/configopaque v1.16.0 - go.opentelemetry.io/collector/config/configretry v1.16.0 - go.opentelemetry.io/collector/config/configtls v1.16.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 + go.opentelemetry.io/collector v0.111.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/config/configauth v0.111.0 + go.opentelemetry.io/collector/config/configcompression v1.17.0 + go.opentelemetry.io/collector/config/configgrpc v0.111.0 + go.opentelemetry.io/collector/config/configopaque v1.17.0 + go.opentelemetry.io/collector/config/configretry v1.17.0 + go.opentelemetry.io/collector/config/configtls v1.17.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/exporter v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 @@ -45,21 +45,21 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/client v1.16.0 // indirect - go.opentelemetry.io/collector/config/confignet v1.16.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/config/internal v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/extension v0.110.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.110.0 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect - go.opentelemetry.io/collector/receiver v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect + go.opentelemetry.io/collector/client v1.17.0 // indirect + go.opentelemetry.io/collector/config/confignet v1.17.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/config/internal v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 // indirect + go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/extension v0.111.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.111.0 // indirect + go.opentelemetry.io/collector/extension/experimental/storage v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect + go.opentelemetry.io/collector/receiver v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect diff --git a/exporter/otlphttpexporter/go.mod b/exporter/otlphttpexporter/go.mod index 6ce8a1908cb..44cc864aa5d 100644 --- a/exporter/otlphttpexporter/go.mod +++ b/exporter/otlphttpexporter/go.mod @@ -4,17 +4,17 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.110.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configcompression v1.16.0 - go.opentelemetry.io/collector/config/confighttp v0.110.0 - go.opentelemetry.io/collector/config/configopaque v1.16.0 - go.opentelemetry.io/collector/config/configretry v1.16.0 - go.opentelemetry.io/collector/config/configtls v1.16.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 + go.opentelemetry.io/collector v0.111.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/config/configcompression v1.17.0 + go.opentelemetry.io/collector/config/confighttp v0.111.0 + go.opentelemetry.io/collector/config/configopaque v1.17.0 + go.opentelemetry.io/collector/config/configretry v1.17.0 + go.opentelemetry.io/collector/config/configtls v1.17.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/exporter v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd @@ -44,21 +44,21 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.11.1 // indirect - go.opentelemetry.io/collector/client v1.16.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.110.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/config/internal v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/extension v0.110.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.110.0 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect - go.opentelemetry.io/collector/receiver v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect + go.opentelemetry.io/collector/client v1.17.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.111.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/config/internal v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 // indirect + go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/extension v0.111.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.111.0 // indirect + go.opentelemetry.io/collector/extension/experimental/storage v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect + go.opentelemetry.io/collector/receiver v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect diff --git a/extension/auth/go.mod b/extension/auth/go.mod index 26ebad88ad1..693d429de65 100644 --- a/extension/auth/go.mod +++ b/extension/auth/go.mod @@ -4,8 +4,8 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/extension v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/extension v0.111.0 go.uber.org/goleak v1.3.0 google.golang.org/grpc v1.67.1 ) @@ -17,8 +17,8 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/google/uuid v1.6.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect diff --git a/extension/experimental/storage/go.mod b/extension/experimental/storage/go.mod index 6fe263dd740..191ff2d3cfc 100644 --- a/extension/experimental/storage/go.mod +++ b/extension/experimental/storage/go.mod @@ -3,14 +3,14 @@ module go.opentelemetry.io/collector/extension/experimental/storage go 1.22.0 require ( - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/extension v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/extension v0.111.0 ) require ( github.com/gogo/protobuf v1.3.2 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/trace v1.30.0 // indirect diff --git a/extension/extensioncapabilities/go.mod b/extension/extensioncapabilities/go.mod index 257b8381743..de46fcd3382 100644 --- a/extension/extensioncapabilities/go.mod +++ b/extension/extensioncapabilities/go.mod @@ -3,9 +3,9 @@ module go.opentelemetry.io/collector/extension/extensioncapabilities go 1.22.0 require ( - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/extension v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/extension v0.111.0 ) require ( @@ -16,8 +16,8 @@ require ( github.com/knadh/koanf/v2 v2.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/trace v1.30.0 // indirect diff --git a/extension/go.mod b/extension/go.mod index c7568a4ffb8..c03106b759f 100644 --- a/extension/go.mod +++ b/extension/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 go.uber.org/goleak v1.3.0 ) @@ -15,8 +15,8 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect diff --git a/extension/memorylimiterextension/go.mod b/extension/memorylimiterextension/go.mod index c053d450f4b..17dd51b8181 100644 --- a/extension/memorylimiterextension/go.mod +++ b/extension/memorylimiterextension/go.mod @@ -4,10 +4,10 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.110.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/extension v0.110.0 + go.opentelemetry.io/collector v0.111.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/extension v0.111.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -33,8 +33,8 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect diff --git a/extension/zpagesextension/go.mod b/extension/zpagesextension/go.mod index 16d3dd7ced3..addc86882f5 100644 --- a/extension/zpagesextension/go.mod +++ b/extension/zpagesextension/go.mod @@ -4,13 +4,13 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.110.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/component/componentstatus v0.110.0 - go.opentelemetry.io/collector/config/configauth v0.110.0 - go.opentelemetry.io/collector/config/confighttp v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/extension v0.110.0 + go.opentelemetry.io/collector v0.111.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/component/componentstatus v0.111.0 + go.opentelemetry.io/collector/config/configauth v0.111.0 + go.opentelemetry.io/collector/config/confighttp v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/extension v0.111.0 go.opentelemetry.io/contrib/zpages v0.55.0 go.opentelemetry.io/otel/sdk v1.30.0 go.opentelemetry.io/otel/trace v1.30.0 @@ -36,16 +36,16 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.11.1 // indirect - go.opentelemetry.io/collector/client v1.16.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.16.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.16.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/config/configtls v1.16.0 // indirect - go.opentelemetry.io/collector/config/internal v0.110.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect + go.opentelemetry.io/collector/client v1.17.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.17.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.17.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/config/configtls v1.17.0 // indirect + go.opentelemetry.io/collector/config/internal v0.111.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect diff --git a/filter/go.mod b/filter/go.mod index 4c2f52e2260..48ef6213e0c 100644 --- a/filter/go.mod +++ b/filter/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/confmap v1.16.0 + go.opentelemetry.io/collector/confmap v1.17.0 ) require ( diff --git a/go.mod b/go.mod index 50246a36c6e..98548a9615d 100644 --- a/go.mod +++ b/go.mod @@ -13,15 +13,15 @@ go 1.22.0 require ( github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/component/componentstatus v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/component/componentstatus v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -52,9 +52,9 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect diff --git a/internal/e2e/go.mod b/internal/e2e/go.mod index 7ea2b379cf1..ee33a7c8702 100644 --- a/internal/e2e/go.mod +++ b/internal/e2e/go.mod @@ -4,27 +4,27 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.110.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/component/componentstatus v0.110.0 - go.opentelemetry.io/collector/config/configgrpc v0.110.0 - go.opentelemetry.io/collector/config/confighttp v0.110.0 - go.opentelemetry.io/collector/config/configopaque v1.16.0 - go.opentelemetry.io/collector/config/configretry v1.16.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/config/configtls v1.16.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/connector v0.110.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 + go.opentelemetry.io/collector v0.111.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/component/componentstatus v0.111.0 + go.opentelemetry.io/collector/config/configgrpc v0.111.0 + go.opentelemetry.io/collector/config/confighttp v0.111.0 + go.opentelemetry.io/collector/config/configopaque v1.17.0 + go.opentelemetry.io/collector/config/configretry v1.17.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/config/configtls v1.17.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/connector v0.111.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/exporter v0.111.0 go.opentelemetry.io/collector/exporter/otlpexporter v0.110.0 go.opentelemetry.io/collector/exporter/otlphttpexporter v0.110.0 - go.opentelemetry.io/collector/extension v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 - go.opentelemetry.io/collector/receiver v0.110.0 + go.opentelemetry.io/collector/extension v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 + go.opentelemetry.io/collector/receiver v0.111.0 go.opentelemetry.io/collector/receiver/otlpreceiver v0.110.0 go.opentelemetry.io/collector/service v0.110.0 go.uber.org/goleak v1.3.0 @@ -71,26 +71,26 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector/client v1.16.0 // indirect - go.opentelemetry.io/collector/component/componentprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.110.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.16.0 // indirect - go.opentelemetry.io/collector/config/confignet v1.16.0 // indirect - go.opentelemetry.io/collector/config/internal v0.110.0 // indirect - go.opentelemetry.io/collector/connector/connectorprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.110.0 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.110.0 // indirect - go.opentelemetry.io/collector/extension/extensioncapabilities v0.110.0 // indirect - go.opentelemetry.io/collector/featuregate v1.16.0 // indirect - go.opentelemetry.io/collector/internal/globalgates v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/processor v0.110.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/semconv v0.110.0 // indirect + go.opentelemetry.io/collector/client v1.17.0 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.111.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.17.0 // indirect + go.opentelemetry.io/collector/config/confignet v1.17.0 // indirect + go.opentelemetry.io/collector/config/internal v0.111.0 // indirect + go.opentelemetry.io/collector/connector/connectorprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.111.0 // indirect + go.opentelemetry.io/collector/extension/experimental/storage v0.111.0 // indirect + go.opentelemetry.io/collector/extension/extensioncapabilities v0.111.0 // indirect + go.opentelemetry.io/collector/featuregate v1.17.0 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/processor v0.111.0 // indirect + go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/semconv v0.111.0 // indirect go.opentelemetry.io/contrib/config v0.10.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect diff --git a/internal/globalgates/go.mod b/internal/globalgates/go.mod index 84556ee8ada..6ec6c965015 100644 --- a/internal/globalgates/go.mod +++ b/internal/globalgates/go.mod @@ -2,7 +2,7 @@ module go.opentelemetry.io/collector/internal/globalgates go 1.22.0 -require go.opentelemetry.io/collector/featuregate v1.16.0 +require go.opentelemetry.io/collector/featuregate v1.17.0 require ( github.com/hashicorp/go-version v1.7.0 // indirect diff --git a/otelcol/go.mod b/otelcol/go.mod index 6857f8de5c0..27ef8184b73 100644 --- a/otelcol/go.mod +++ b/otelcol/go.mod @@ -5,18 +5,18 @@ go 1.22.0 require ( github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/component/componentstatus v0.110.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/connector v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/extension v0.110.0 - go.opentelemetry.io/collector/featuregate v1.16.0 - go.opentelemetry.io/collector/pipeline v0.110.0 - go.opentelemetry.io/collector/processor v0.110.0 - go.opentelemetry.io/collector/receiver v0.110.0 - go.opentelemetry.io/collector/service v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/component/componentstatus v0.111.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/connector v0.111.0 + go.opentelemetry.io/collector/exporter v0.111.0 + go.opentelemetry.io/collector/extension v0.111.0 + go.opentelemetry.io/collector/featuregate v1.17.0 + go.opentelemetry.io/collector/pipeline v0.111.0 + go.opentelemetry.io/collector/processor v0.111.0 + go.opentelemetry.io/collector/receiver v0.111.0 + go.opentelemetry.io/collector/service v0.111.0 go.opentelemetry.io/contrib/config v0.10.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 @@ -64,22 +64,22 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector v0.110.0 // indirect - go.opentelemetry.io/collector/component/componentprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/connector/connectorprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/extension/extensioncapabilities v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalgates v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.110.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/semconv v0.110.0 // indirect + go.opentelemetry.io/collector v0.111.0 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/connector/connectorprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 // indirect + go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/extension/extensioncapabilities v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.111.0 // indirect + go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/semconv v0.111.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.30.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.6.0 // indirect diff --git a/otelcol/otelcoltest/go.mod b/otelcol/otelcoltest/go.mod index b841a8aee5b..7b2afe17bc2 100644 --- a/otelcol/otelcoltest/go.mod +++ b/otelcol/otelcoltest/go.mod @@ -4,20 +4,20 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/confmap/provider/envprovider v1.16.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v1.16.0 - go.opentelemetry.io/collector/confmap/provider/httpprovider v0.110.0 - go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.110.0 - go.opentelemetry.io/collector/connector v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/extension v0.110.0 - go.opentelemetry.io/collector/otelcol v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 - go.opentelemetry.io/collector/processor v0.110.0 - go.opentelemetry.io/collector/receiver v0.110.0 - go.opentelemetry.io/collector/service v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/confmap/provider/envprovider v1.17.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v1.17.0 + go.opentelemetry.io/collector/confmap/provider/httpprovider v1.17.0 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.17.0 + go.opentelemetry.io/collector/connector v0.111.0 + go.opentelemetry.io/collector/exporter v0.111.0 + go.opentelemetry.io/collector/extension v0.111.0 + go.opentelemetry.io/collector/otelcol v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 + go.opentelemetry.io/collector/processor v0.111.0 + go.opentelemetry.io/collector/receiver v0.111.0 + go.opentelemetry.io/collector/service v0.111.0 go.uber.org/goleak v1.3.0 ) @@ -59,25 +59,25 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector v0.110.0 // indirect - go.opentelemetry.io/collector/component/componentprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/component/componentstatus v0.110.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/connector/connectorprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/extension/extensioncapabilities v0.110.0 // indirect - go.opentelemetry.io/collector/featuregate v1.16.0 // indirect - go.opentelemetry.io/collector/internal/globalgates v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.110.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/semconv v0.110.0 // indirect + go.opentelemetry.io/collector v0.111.0 // indirect + go.opentelemetry.io/collector/component/componentprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/component/componentstatus v0.111.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/connector/connectorprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 // indirect + go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/extension/extensioncapabilities v0.111.0 // indirect + go.opentelemetry.io/collector/featuregate v1.17.0 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.111.0 // indirect + go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/semconv v0.111.0 // indirect go.opentelemetry.io/contrib/config v0.10.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.30.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect diff --git a/pdata/pprofile/go.mod b/pdata/pprofile/go.mod index 1f6582bf67e..e2c272ddcee 100644 --- a/pdata/pprofile/go.mod +++ b/pdata/pprofile/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/json-iterator/go v1.1.12 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/pdata v1.16.0 + go.opentelemetry.io/collector/pdata v1.17.0 go.uber.org/goleak v1.3.0 google.golang.org/grpc v1.67.1 ) diff --git a/pdata/testdata/go.mod b/pdata/testdata/go.mod index 272b2055a9e..7eb6ef799e3 100644 --- a/pdata/testdata/go.mod +++ b/pdata/testdata/go.mod @@ -3,8 +3,8 @@ module go.opentelemetry.io/collector/pdata/testdata go 1.22.0 require ( - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 ) require ( diff --git a/pipeline/go.mod b/pipeline/go.mod index 41c0c198acc..f77b5783ea7 100644 --- a/pipeline/go.mod +++ b/pipeline/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 ) require ( diff --git a/processor/batchprocessor/go.mod b/processor/batchprocessor/go.mod index 991ff5ae543..34b68e7d07b 100644 --- a/processor/batchprocessor/go.mod +++ b/processor/batchprocessor/go.mod @@ -4,15 +4,15 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/client v1.16.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 - go.opentelemetry.io/collector/processor v0.110.0 + go.opentelemetry.io/collector/client v1.17.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 + go.opentelemetry.io/collector/processor v0.111.0 go.opentelemetry.io/otel v1.30.0 go.opentelemetry.io/otel/metric v1.30.0 go.opentelemetry.io/otel/sdk/metric v1.30.0 @@ -37,12 +37,12 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/component/componentstatus v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.110.0 // indirect + go.opentelemetry.io/collector/component/componentstatus v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect + go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/net v0.28.0 // indirect diff --git a/processor/go.mod b/processor/go.mod index d9f64ad9153..0e7b078523c 100644 --- a/processor/go.mod +++ b/processor/go.mod @@ -5,17 +5,17 @@ go 1.22.0 require ( github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/component/componentstatus v0.110.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 - go.opentelemetry.io/collector/processor/processorprofiles v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/component/componentstatus v0.111.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 + go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 go.opentelemetry.io/otel v1.30.0 go.opentelemetry.io/otel/metric v1.30.0 go.opentelemetry.io/otel/sdk/metric v1.30.0 @@ -32,7 +32,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect diff --git a/processor/memorylimiterprocessor/go.mod b/processor/memorylimiterprocessor/go.mod index 0fd6dc5f776..ba367456427 100644 --- a/processor/memorylimiterprocessor/go.mod +++ b/processor/memorylimiterprocessor/go.mod @@ -4,15 +4,15 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.110.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pipeline v0.110.0 - go.opentelemetry.io/collector/processor v0.110.0 + go.opentelemetry.io/collector v0.111.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pipeline v0.111.0 + go.opentelemetry.io/collector/processor v0.111.0 go.opentelemetry.io/otel v1.30.0 go.opentelemetry.io/otel/metric v1.30.0 go.opentelemetry.io/otel/sdk/metric v1.30.0 @@ -44,12 +44,12 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector/component/componentstatus v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.110.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.110.0 // indirect + go.opentelemetry.io/collector/component/componentstatus v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.111.0 // indirect + go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect diff --git a/processor/processorprofiles/go.mod b/processor/processorprofiles/go.mod index f66cdaa96cb..7072c412a6a 100644 --- a/processor/processorprofiles/go.mod +++ b/processor/processorprofiles/go.mod @@ -4,11 +4,11 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 - go.opentelemetry.io/collector/processor v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 + go.opentelemetry.io/collector/processor v0.111.0 ) require ( @@ -18,11 +18,11 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/consumer v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/consumer v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/trace v1.30.0 // indirect diff --git a/receiver/go.mod b/receiver/go.mod index 3fb74d2dc7f..a558debb96f 100644 --- a/receiver/go.mod +++ b/receiver/go.mod @@ -5,14 +5,14 @@ go 1.22.0 require ( github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pipeline v0.110.0 - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pipeline v0.111.0 + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 go.opentelemetry.io/otel v1.30.0 go.opentelemetry.io/otel/metric v1.30.0 go.opentelemetry.io/otel/sdk v1.30.0 @@ -32,8 +32,8 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect golang.org/x/net v0.28.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/text v0.17.0 // indirect diff --git a/receiver/nopreceiver/go.mod b/receiver/nopreceiver/go.mod index 0df59a5b9db..0c8427aab87 100644 --- a/receiver/nopreceiver/go.mod +++ b/receiver/nopreceiver/go.mod @@ -4,11 +4,11 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/receiver v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/receiver v0.111.0 go.uber.org/goleak v1.3.0 ) @@ -28,13 +28,13 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect diff --git a/receiver/otlpreceiver/go.mod b/receiver/otlpreceiver/go.mod index c88d8d42723..faf6ad7cc18 100644 --- a/receiver/otlpreceiver/go.mod +++ b/receiver/otlpreceiver/go.mod @@ -6,23 +6,23 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/klauspost/compress v1.17.10 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.110.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/component/componentstatus v0.110.0 - go.opentelemetry.io/collector/config/configauth v0.110.0 - go.opentelemetry.io/collector/config/configgrpc v0.110.0 - go.opentelemetry.io/collector/config/confighttp v0.110.0 - go.opentelemetry.io/collector/config/confignet v1.16.0 - go.opentelemetry.io/collector/config/configtls v1.16.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 - go.opentelemetry.io/collector/receiver v0.110.0 - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 + go.opentelemetry.io/collector v0.111.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/component/componentstatus v0.111.0 + go.opentelemetry.io/collector/config/configauth v0.111.0 + go.opentelemetry.io/collector/config/configgrpc v0.111.0 + go.opentelemetry.io/collector/config/confighttp v0.111.0 + go.opentelemetry.io/collector/config/confignet v1.17.0 + go.opentelemetry.io/collector/config/configtls v1.17.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 + go.opentelemetry.io/collector/receiver v0.111.0 + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 @@ -50,15 +50,15 @@ require ( github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.11.1 // indirect - go.opentelemetry.io/collector/client v1.16.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.16.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.16.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/config/internal v0.110.0 // indirect - go.opentelemetry.io/collector/extension v0.110.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pipeline v0.110.0 // indirect + go.opentelemetry.io/collector/client v1.17.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.17.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.17.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/config/internal v0.111.0 // indirect + go.opentelemetry.io/collector/extension v0.111.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pipeline v0.111.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect diff --git a/receiver/receiverprofiles/go.mod b/receiver/receiverprofiles/go.mod index 7209378ad05..36f852ee853 100644 --- a/receiver/receiverprofiles/go.mod +++ b/receiver/receiverprofiles/go.mod @@ -4,11 +4,11 @@ go 1.22.0 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 - go.opentelemetry.io/collector/receiver v0.110.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 + go.opentelemetry.io/collector/receiver v0.111.0 ) require ( @@ -18,11 +18,11 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect - go.opentelemetry.io/collector/consumer v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect - go.opentelemetry.io/collector/pdata v1.16.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect + go.opentelemetry.io/collector/consumer v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect + go.opentelemetry.io/collector/pdata v1.17.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/metric v1.30.0 // indirect go.opentelemetry.io/otel/trace v1.30.0 // indirect diff --git a/service/go.mod b/service/go.mod index 468cb61f957..d1907260199 100644 --- a/service/go.mod +++ b/service/go.mod @@ -9,34 +9,34 @@ require ( github.com/prometheus/common v0.60.0 github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.110.0 - go.opentelemetry.io/collector/component v0.110.0 - go.opentelemetry.io/collector/component/componentprofiles v0.110.0 - go.opentelemetry.io/collector/component/componentstatus v0.110.0 - go.opentelemetry.io/collector/config/confighttp v0.110.0 - go.opentelemetry.io/collector/config/configtelemetry v0.110.0 - go.opentelemetry.io/collector/confmap v1.16.0 - go.opentelemetry.io/collector/connector v0.110.0 - go.opentelemetry.io/collector/connector/connectorprofiles v0.110.0 - go.opentelemetry.io/collector/consumer v0.110.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 - go.opentelemetry.io/collector/consumer/consumertest v0.110.0 - go.opentelemetry.io/collector/exporter v0.110.0 - go.opentelemetry.io/collector/exporter/exporterprofiles v0.110.0 - go.opentelemetry.io/collector/extension v0.110.0 - go.opentelemetry.io/collector/extension/extensioncapabilities v0.110.0 - go.opentelemetry.io/collector/extension/zpagesextension v0.110.0 - go.opentelemetry.io/collector/featuregate v1.16.0 - go.opentelemetry.io/collector/internal/globalgates v0.110.0 - go.opentelemetry.io/collector/pdata v1.16.0 - go.opentelemetry.io/collector/pdata/pprofile v0.110.0 - go.opentelemetry.io/collector/pdata/testdata v0.110.0 - go.opentelemetry.io/collector/pipeline v0.110.0 - go.opentelemetry.io/collector/processor v0.110.0 - go.opentelemetry.io/collector/processor/processorprofiles v0.110.0 - go.opentelemetry.io/collector/receiver v0.110.0 - go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 - go.opentelemetry.io/collector/semconv v0.110.0 + go.opentelemetry.io/collector v0.111.0 + go.opentelemetry.io/collector/component v0.111.0 + go.opentelemetry.io/collector/component/componentprofiles v0.111.0 + go.opentelemetry.io/collector/component/componentstatus v0.111.0 + go.opentelemetry.io/collector/config/confighttp v0.111.0 + go.opentelemetry.io/collector/config/configtelemetry v0.111.0 + go.opentelemetry.io/collector/confmap v1.17.0 + go.opentelemetry.io/collector/connector v0.111.0 + go.opentelemetry.io/collector/connector/connectorprofiles v0.111.0 + go.opentelemetry.io/collector/consumer v0.111.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 + go.opentelemetry.io/collector/consumer/consumertest v0.111.0 + go.opentelemetry.io/collector/exporter v0.111.0 + go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 + go.opentelemetry.io/collector/extension v0.111.0 + go.opentelemetry.io/collector/extension/extensioncapabilities v0.111.0 + go.opentelemetry.io/collector/extension/zpagesextension v0.111.0 + go.opentelemetry.io/collector/featuregate v1.17.0 + go.opentelemetry.io/collector/internal/globalgates v0.111.0 + go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/pdata/pprofile v0.111.0 + go.opentelemetry.io/collector/pdata/testdata v0.111.0 + go.opentelemetry.io/collector/pipeline v0.111.0 + go.opentelemetry.io/collector/processor v0.111.0 + go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 + go.opentelemetry.io/collector/receiver v0.111.0 + go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 + go.opentelemetry.io/collector/semconv v0.111.0 go.opentelemetry.io/contrib/config v0.10.0 go.opentelemetry.io/contrib/propagators/b3 v1.30.0 go.opentelemetry.io/otel v1.30.0 @@ -88,14 +88,14 @@ require ( github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector/client v1.16.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.110.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.16.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.16.0 // indirect - go.opentelemetry.io/collector/config/configtls v1.16.0 // indirect - go.opentelemetry.io/collector/config/internal v0.110.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.110.0 // indirect - go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect + go.opentelemetry.io/collector/client v1.17.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.111.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.17.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.17.0 // indirect + go.opentelemetry.io/collector/config/configtls v1.17.0 // indirect + go.opentelemetry.io/collector/config/internal v0.111.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.111.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect go.opentelemetry.io/contrib/zpages v0.55.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.6.0 // indirect diff --git a/versions.yaml b/versions.yaml index 0ea5a162060..8cd68d58595 100644 --- a/versions.yaml +++ b/versions.yaml @@ -3,7 +3,7 @@ module-sets: stable: - version: v1.16.0 + version: v1.17.0 modules: - go.opentelemetry.io/collector/client - go.opentelemetry.io/collector/featuregate @@ -20,7 +20,7 @@ module-sets: - go.opentelemetry.io/collector/config/configtls - go.opentelemetry.io/collector/config/confignet beta: - version: v0.110.0 + version: v0.111.0 modules: - go.opentelemetry.io/collector - go.opentelemetry.io/collector/internal/globalgates From 403f1df2d2268ba42d927d020f7b386eeab93cf4 Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Fri, 4 Oct 2024 13:13:36 +0200 Subject: [PATCH 05/14] [chore] Update release schedule (#11356) #### Description Updates release schedule after v0.111.0 --- docs/release.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/release.md b/docs/release.md index 1b138c04c6b..73d792670ab 100644 --- a/docs/release.md +++ b/docs/release.md @@ -170,8 +170,6 @@ Once a module is ready to be released under the `1.x` version scheme, file a PR | Date | Version | Release manager | |------------|----------|---------------------------------------------------| -| 2024-09-23 | v0.110.0 | [@jpkrohling](https://github.com/jpkrohling) | -| 2024-10-07 | v0.111.0 | [@mx-psi](https://github.com/mx-psi) | | 2024-10-21 | v0.112.0 | [@evan-bradley](https://github.com/evan-bradley) | | 2024-11-04 | v0.113.0 | [@djaglowski](https://github.com/djaglowski) | | 2024-11-18 | v0.114.0 | [@TylerHelmuth](https://github.com/TylerHelmuth) | @@ -180,3 +178,5 @@ Once a module is ready to be released under the `1.x` version scheme, file a PR | 2025-01-06 | v0.117.0 | [@dmitryax](https://github.com/dmitryax) | | 2025-01-20 | v0.118.0 | [@codeboten](https://github.com/codeboten) | | 2025-02-03 | v0.119.0 | [@bogdandrutu](https://github.com/bogdandrutu) | +| 2025-02-17 | v0.120.0 | [@jpkrohling](https://github.com/jpkrohling) | +| 2025-03-03 | v0.121.0 | [@mx-psi](https://github.com/mx-psi) | From a260518040fa1915d510f96071418c1fcdf402e5 Mon Sep 17 00:00:00 2001 From: Christos Markou Date: Fri, 4 Oct 2024 17:51:03 +0300 Subject: [PATCH 06/14] [mdatagen] Generate documentation for components with resource attributes only (#11242) #### Description This PR adds support for generating `documentation.md` files for components which only define resource attributes. This was reported at https://github.com/open-telemetry/opentelemetry-collector/issues/10705 and also applies at https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34210. #### Link to tracking issue Fixes https://github.com/open-telemetry/opentelemetry-collector/issues/10705 #### Testing Tuned tests and added a sample processor component which only defines resource attributes. #### Documentation Signed-off-by: ChrsMark --- .../metagen_resource_attrs_only_doc.yaml | 25 +++ cmd/mdatagen/go.mod | 10 ++ cmd/mdatagen/internal/command.go | 2 +- cmd/mdatagen/internal/command_test.go | 32 ++-- .../internal/sampleprocessor/README.md | 22 +++ cmd/mdatagen/internal/sampleprocessor/doc.go | 10 ++ .../internal/sampleprocessor/documentation.md | 16 ++ .../internal/sampleprocessor/factory.go | 61 +++++++ .../generated_component_test.go | 151 ++++++++++++++++++ .../sampleprocessor/generated_package_test.go | 13 ++ .../internal/metadata/generated_config.go | 67 ++++++++ .../metadata/generated_config_test.go | 72 +++++++++ .../internal/metadata/generated_resource.go | 92 +++++++++++ .../metadata/generated_resource_test.go | 82 ++++++++++ .../internal/metadata/generated_status.go | 18 +++ .../internal/metadata/testdata/config.yaml | 37 +++++ .../internal/sampleprocessor/metadata.yaml | 68 ++++++++ 17 files changed, 762 insertions(+), 16 deletions(-) create mode 100644 .chloggen/metagen_resource_attrs_only_doc.yaml create mode 100644 cmd/mdatagen/internal/sampleprocessor/README.md create mode 100644 cmd/mdatagen/internal/sampleprocessor/doc.go create mode 100644 cmd/mdatagen/internal/sampleprocessor/documentation.md create mode 100644 cmd/mdatagen/internal/sampleprocessor/factory.go create mode 100644 cmd/mdatagen/internal/sampleprocessor/generated_component_test.go create mode 100644 cmd/mdatagen/internal/sampleprocessor/generated_package_test.go create mode 100644 cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_config.go create mode 100644 cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_config_test.go create mode 100644 cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_resource.go create mode 100644 cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_resource_test.go create mode 100644 cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_status.go create mode 100644 cmd/mdatagen/internal/sampleprocessor/internal/metadata/testdata/config.yaml create mode 100644 cmd/mdatagen/internal/sampleprocessor/metadata.yaml diff --git a/.chloggen/metagen_resource_attrs_only_doc.yaml b/.chloggen/metagen_resource_attrs_only_doc.yaml new file mode 100644 index 00000000000..2d999bff83d --- /dev/null +++ b/.chloggen/metagen_resource_attrs_only_doc.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: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: mdatagen + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Generate documentation for components with resource attributes only + +# One or more tracking issues or pull requests related to the change +issues: [10705] + +# (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/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod index ae99b74fae3..bfe9372cfd8 100644 --- a/cmd/mdatagen/go.mod +++ b/cmd/mdatagen/go.mod @@ -14,6 +14,7 @@ require ( go.opentelemetry.io/collector/consumer/consumertest v0.111.0 go.opentelemetry.io/collector/filter v0.111.0 go.opentelemetry.io/collector/pdata v1.17.0 + go.opentelemetry.io/collector/processor v0.111.0 go.opentelemetry.io/collector/receiver v0.111.0 go.opentelemetry.io/collector/semconv v0.111.0 go.opentelemetry.io/otel/metric v1.30.0 @@ -42,10 +43,13 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + go.opentelemetry.io/collector/component/componentstatus v0.111.0 // indirect go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.111.0 // indirect go.opentelemetry.io/collector/pipeline v0.111.0 // indirect + go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 // indirect go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/sdk v1.30.0 // indirect @@ -95,3 +99,9 @@ replace go.opentelemetry.io/collector/receiver/receiverprofiles => ../../receive replace go.opentelemetry.io/collector/pipeline => ../../pipeline replace go.opentelemetry.io/collector/internal/globalsignal => ../../internal/globalsignal + +replace go.opentelemetry.io/collector/processor/processorprofiles => ../../processor/processorprofiles + +replace go.opentelemetry.io/collector/component/componentstatus => ../../component/componentstatus + +replace go.opentelemetry.io/collector/processor => ../../processor diff --git a/cmd/mdatagen/internal/command.go b/cmd/mdatagen/internal/command.go index fbd4088a34f..1c1d84287db 100644 --- a/cmd/mdatagen/internal/command.go +++ b/cmd/mdatagen/internal/command.go @@ -116,7 +116,7 @@ func run(ymlPath string) error { toGenerate[filepath.Join(tmplDir, "telemetry_test.go.tmpl")] = filepath.Join(codeDir, "generated_telemetry_test.go") } - if len(md.Metrics) != 0 || len(md.Telemetry.Metrics) != 0 { // if there's metrics or internal metrics, generate documentation for them + if len(md.Metrics) != 0 || len(md.Telemetry.Metrics) != 0 || len(md.ResourceAttributes) != 0 { // if there's metrics or internal metrics, generate documentation for them toGenerate[filepath.Join(tmplDir, "documentation.md.tmpl")] = filepath.Join(ymlDir, "documentation.md") } diff --git a/cmd/mdatagen/internal/command_test.go b/cmd/mdatagen/internal/command_test.go index b1d82b55f58..b19bef13296 100644 --- a/cmd/mdatagen/internal/command_test.go +++ b/cmd/mdatagen/internal/command_test.go @@ -19,17 +19,18 @@ import ( func TestRunContents(t *testing.T) { tests := []struct { - yml string - wantMetricsGenerated bool - wantMetricsContext bool - wantConfigGenerated bool - wantTelemetryGenerated bool - wantStatusGenerated bool - wantGoleakIgnore bool - wantGoleakSkip bool - wantGoleakSetup bool - wantGoleakTeardown bool - wantErr bool + yml string + wantMetricsGenerated bool + wantMetricsContext bool + wantConfigGenerated bool + wantTelemetryGenerated bool + wantResourceAttributesGenerated bool + wantStatusGenerated bool + wantGoleakIgnore bool + wantGoleakSkip bool + wantGoleakSetup bool + wantGoleakTeardown bool + wantErr bool }{ { yml: "invalid.yaml", @@ -42,9 +43,10 @@ func TestRunContents(t *testing.T) { wantStatusGenerated: true, }, { - yml: "resource_attributes_only.yaml", - wantConfigGenerated: true, - wantStatusGenerated: true, + yml: "resource_attributes_only.yaml", + wantConfigGenerated: true, + wantStatusGenerated: true, + wantResourceAttributesGenerated: true, }, { yml: "status_only.yaml", @@ -168,7 +170,7 @@ foo require.NoFileExists(t, filepath.Join(tmpdir, "internal/metadata/generated_telemetry_test.go")) } - if !tt.wantMetricsGenerated && !tt.wantTelemetryGenerated { + if !tt.wantMetricsGenerated && !tt.wantTelemetryGenerated && !tt.wantResourceAttributesGenerated { require.NoFileExists(t, filepath.Join(tmpdir, "documentation.md")) } diff --git a/cmd/mdatagen/internal/sampleprocessor/README.md b/cmd/mdatagen/internal/sampleprocessor/README.md new file mode 100644 index 00000000000..57d79c1f915 --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/README.md @@ -0,0 +1,22 @@ +# Sample Processor +This processor is used for testing purposes to check the output of mdatagen. + +| Status | | +| ------------- |-----------| +| Stability | [development]: logs | +| | [beta]: traces | +| | [stable]: metrics | +| Unsupported Platforms | freebsd, illumos | +| Distributions | [] | +| Warnings | [Any additional information that should be brought to the consumer's attention](#warnings) | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fsample%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fsample) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fsample%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fsample) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@some](https://www.github.com/some) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable + + +## Warnings + +This is where warnings are described. diff --git a/cmd/mdatagen/internal/sampleprocessor/doc.go b/cmd/mdatagen/internal/sampleprocessor/doc.go new file mode 100644 index 00000000000..0fc1c748f91 --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/doc.go @@ -0,0 +1,10 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Generate a test metrics builder from a sample metrics set covering all configuration options. +//go:generate mdatagen metadata.yaml + +// Deprecated: This package is moving to https://github.com/open-telemetry/opentelemetry-collector and will eventually be removed. +// Please see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30497 +// This is a sample receiver package used to showcase how mdatagen is applied. +package sampleprocessor // import "go.opentelemetry.io/collector/cmd/mdatagen/internal/sampleprocessor" diff --git a/cmd/mdatagen/internal/sampleprocessor/documentation.md b/cmd/mdatagen/internal/sampleprocessor/documentation.md new file mode 100644 index 00000000000..5c1d70aa3d5 --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/documentation.md @@ -0,0 +1,16 @@ +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# sample + +## Resource Attributes + +| Name | Description | Values | Enabled | +| ---- | ----------- | ------ | ------- | +| map.resource.attr | Resource attribute with a map value. | Any Map | true | +| optional.resource.attr | Explicitly disabled ResourceAttribute. | Any Str | false | +| slice.resource.attr | Resource attribute with a slice value. | Any Slice | true | +| string.enum.resource.attr | Resource attribute with a known set of string values. | Str: ``one``, ``two`` | true | +| string.resource.attr | Resource attribute with any string value. | Any Str | true | +| string.resource.attr_disable_warning | Resource attribute with any string value. | Any Str | true | +| string.resource.attr_remove_warning | Resource attribute with any string value. | Any Str | false | +| string.resource.attr_to_be_removed | Resource attribute with any string value. | Any Str | true | diff --git a/cmd/mdatagen/internal/sampleprocessor/factory.go b/cmd/mdatagen/internal/sampleprocessor/factory.go new file mode 100644 index 00000000000..a6f2814b3dd --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/factory.go @@ -0,0 +1,61 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sampleprocessor // import "go.opentelemetry.io/collector/cmd/mdatagen/internal/sampleprocessor" + +import ( + "context" + + "go.opentelemetry.io/collector/cmd/mdatagen/internal/sampleprocessor/internal/metadata" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" +) + +// NewFactory returns a receiver.Factory for sample receiver. +func NewFactory() processor.Factory { + return processor.NewFactory( + metadata.Type, + func() component.Config { return &struct{}{} }, + processor.WithTraces(createTracesProcessor, metadata.TracesStability), + processor.WithMetrics(createMetricsProcessor, metadata.MetricsStability), + processor.WithLogs(createLogsProcessor, metadata.LogsStability)) +} + +func createTracesProcessor(context.Context, processor.Settings, component.Config, consumer.Traces) (processor.Traces, error) { + return nopInstance, nil +} + +func createMetricsProcessor(context.Context, processor.Settings, component.Config, consumer.Metrics) (processor.Metrics, error) { + return nopInstance, nil +} + +func createLogsProcessor(context.Context, processor.Settings, component.Config, consumer.Logs) (processor.Logs, error) { + return nopInstance, nil +} + +var nopInstance = &nopProcessor{} + +type nopProcessor struct { + component.StartFunc + component.ShutdownFunc +} + +func (n nopProcessor) ConsumeTraces(context.Context, ptrace.Traces) error { + return nil +} + +func (n nopProcessor) ConsumeLogs(context.Context, plog.Logs) error { + return nil +} + +func (n nopProcessor) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: true} +} + +func (n nopProcessor) ConsumeMetrics(context.Context, pmetric.Metrics) error { + return nil +} diff --git a/cmd/mdatagen/internal/sampleprocessor/generated_component_test.go b/cmd/mdatagen/internal/sampleprocessor/generated_component_test.go new file mode 100644 index 00000000000..e42e4bac50c --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/generated_component_test.go @@ -0,0 +1,151 @@ +// Code generated by mdatagen. DO NOT EDIT. +//go:build !freebsd && !illumos + +package sampleprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "sample", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.Settings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set processor.Settings, cfg component.Config) (component.Component, error) { + return factory.CreateLogs(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "metrics", + createFn: func(ctx context.Context, set processor.Settings, cfg component.Config) (component.Component, error) { + return factory.CreateMetrics(ctx, set, cfg, consumertest.NewNop()) + }, + }, + + { + name: "traces", + createFn: func(ctx context.Context, set processor.Settings, cfg component.Config) (component.Component, error) { + return factory.CreateTraces(ctx, set, cfg, consumertest.NewNop()) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, sub.Unmarshal(&cfg)) + + for _, tt := range tests { + t.Run(tt.name+"-shutdown", func(t *testing.T) { + c, err := tt.createFn(context.Background(), processortest.NewNopSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(tt.name+"-lifecycle", func(t *testing.T) { + c, err := tt.createFn(context.Background(), processortest.NewNopSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch tt.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/cmd/mdatagen/internal/sampleprocessor/generated_package_test.go b/cmd/mdatagen/internal/sampleprocessor/generated_package_test.go new file mode 100644 index 00000000000..6abd0d88121 --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package sampleprocessor + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_config.go b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_config.go new file mode 100644 index 00000000000..42e1b6f641a --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_config.go @@ -0,0 +1,67 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/confmap" +) + +// ResourceAttributeConfig provides common config for a particular resource attribute. +type ResourceAttributeConfig struct { + Enabled bool `mapstructure:"enabled"` + + enabledSetByUser bool +} + +func (rac *ResourceAttributeConfig) Unmarshal(parser *confmap.Conf) error { + if parser == nil { + return nil + } + err := parser.Unmarshal(rac) + if err != nil { + return err + } + rac.enabledSetByUser = parser.IsSet("enabled") + return nil +} + +// ResourceAttributesConfig provides config for sample resource attributes. +type ResourceAttributesConfig struct { + MapResourceAttr ResourceAttributeConfig `mapstructure:"map.resource.attr"` + OptionalResourceAttr ResourceAttributeConfig `mapstructure:"optional.resource.attr"` + SliceResourceAttr ResourceAttributeConfig `mapstructure:"slice.resource.attr"` + StringEnumResourceAttr ResourceAttributeConfig `mapstructure:"string.enum.resource.attr"` + StringResourceAttr ResourceAttributeConfig `mapstructure:"string.resource.attr"` + StringResourceAttrDisableWarning ResourceAttributeConfig `mapstructure:"string.resource.attr_disable_warning"` + StringResourceAttrRemoveWarning ResourceAttributeConfig `mapstructure:"string.resource.attr_remove_warning"` + StringResourceAttrToBeRemoved ResourceAttributeConfig `mapstructure:"string.resource.attr_to_be_removed"` +} + +func DefaultResourceAttributesConfig() ResourceAttributesConfig { + return ResourceAttributesConfig{ + MapResourceAttr: ResourceAttributeConfig{ + Enabled: true, + }, + OptionalResourceAttr: ResourceAttributeConfig{ + Enabled: false, + }, + SliceResourceAttr: ResourceAttributeConfig{ + Enabled: true, + }, + StringEnumResourceAttr: ResourceAttributeConfig{ + Enabled: true, + }, + StringResourceAttr: ResourceAttributeConfig{ + Enabled: true, + }, + StringResourceAttrDisableWarning: ResourceAttributeConfig{ + Enabled: true, + }, + StringResourceAttrRemoveWarning: ResourceAttributeConfig{ + Enabled: false, + }, + StringResourceAttrToBeRemoved: ResourceAttributeConfig{ + Enabled: true, + }, + } +} diff --git a/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_config_test.go b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_config_test.go new file mode 100644 index 00000000000..7b14c1b960e --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_config_test.go @@ -0,0 +1,72 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "path/filepath" + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/confmap/confmaptest" +) + +func TestResourceAttributesConfig(t *testing.T) { + tests := []struct { + name string + want ResourceAttributesConfig + }{ + { + name: "default", + want: DefaultResourceAttributesConfig(), + }, + { + name: "all_set", + want: ResourceAttributesConfig{ + MapResourceAttr: ResourceAttributeConfig{Enabled: true}, + OptionalResourceAttr: ResourceAttributeConfig{Enabled: true}, + SliceResourceAttr: ResourceAttributeConfig{Enabled: true}, + StringEnumResourceAttr: ResourceAttributeConfig{Enabled: true}, + StringResourceAttr: ResourceAttributeConfig{Enabled: true}, + StringResourceAttrDisableWarning: ResourceAttributeConfig{Enabled: true}, + StringResourceAttrRemoveWarning: ResourceAttributeConfig{Enabled: true}, + StringResourceAttrToBeRemoved: ResourceAttributeConfig{Enabled: true}, + }, + }, + { + name: "none_set", + want: ResourceAttributesConfig{ + MapResourceAttr: ResourceAttributeConfig{Enabled: false}, + OptionalResourceAttr: ResourceAttributeConfig{Enabled: false}, + SliceResourceAttr: ResourceAttributeConfig{Enabled: false}, + StringEnumResourceAttr: ResourceAttributeConfig{Enabled: false}, + StringResourceAttr: ResourceAttributeConfig{Enabled: false}, + StringResourceAttrDisableWarning: ResourceAttributeConfig{Enabled: false}, + StringResourceAttrRemoveWarning: ResourceAttributeConfig{Enabled: false}, + StringResourceAttrToBeRemoved: ResourceAttributeConfig{Enabled: false}, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := loadResourceAttributesConfig(t, tt.name) + if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(ResourceAttributeConfig{})); diff != "" { + t.Errorf("Config mismatch (-expected +actual):\n%s", diff) + } + }) + } +} + +func loadResourceAttributesConfig(t *testing.T, name string) ResourceAttributesConfig { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + sub, err := cm.Sub(name) + require.NoError(t, err) + sub, err = sub.Sub("resource_attributes") + require.NoError(t, err) + cfg := DefaultResourceAttributesConfig() + require.NoError(t, sub.Unmarshal(&cfg)) + return cfg +} diff --git a/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_resource.go b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_resource.go new file mode 100644 index 00000000000..da69b3c0841 --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_resource.go @@ -0,0 +1,92 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/pdata/pcommon" +) + +// ResourceBuilder is a helper struct to build resources predefined in metadata.yaml. +// The ResourceBuilder is not thread-safe and must not to be used in multiple goroutines. +type ResourceBuilder struct { + config ResourceAttributesConfig + res pcommon.Resource +} + +// NewResourceBuilder creates a new ResourceBuilder. This method should be called on the start of the application. +func NewResourceBuilder(rac ResourceAttributesConfig) *ResourceBuilder { + return &ResourceBuilder{ + config: rac, + res: pcommon.NewResource(), + } +} + +// SetMapResourceAttr sets provided value as "map.resource.attr" attribute. +func (rb *ResourceBuilder) SetMapResourceAttr(val map[string]any) { + if rb.config.MapResourceAttr.Enabled { + rb.res.Attributes().PutEmptyMap("map.resource.attr").FromRaw(val) + } +} + +// SetOptionalResourceAttr sets provided value as "optional.resource.attr" attribute. +func (rb *ResourceBuilder) SetOptionalResourceAttr(val string) { + if rb.config.OptionalResourceAttr.Enabled { + rb.res.Attributes().PutStr("optional.resource.attr", val) + } +} + +// SetSliceResourceAttr sets provided value as "slice.resource.attr" attribute. +func (rb *ResourceBuilder) SetSliceResourceAttr(val []any) { + if rb.config.SliceResourceAttr.Enabled { + rb.res.Attributes().PutEmptySlice("slice.resource.attr").FromRaw(val) + } +} + +// SetStringEnumResourceAttrOne sets "string.enum.resource.attr=one" attribute. +func (rb *ResourceBuilder) SetStringEnumResourceAttrOne() { + if rb.config.StringEnumResourceAttr.Enabled { + rb.res.Attributes().PutStr("string.enum.resource.attr", "one") + } +} + +// SetStringEnumResourceAttrTwo sets "string.enum.resource.attr=two" attribute. +func (rb *ResourceBuilder) SetStringEnumResourceAttrTwo() { + if rb.config.StringEnumResourceAttr.Enabled { + rb.res.Attributes().PutStr("string.enum.resource.attr", "two") + } +} + +// SetStringResourceAttr sets provided value as "string.resource.attr" attribute. +func (rb *ResourceBuilder) SetStringResourceAttr(val string) { + if rb.config.StringResourceAttr.Enabled { + rb.res.Attributes().PutStr("string.resource.attr", val) + } +} + +// SetStringResourceAttrDisableWarning sets provided value as "string.resource.attr_disable_warning" attribute. +func (rb *ResourceBuilder) SetStringResourceAttrDisableWarning(val string) { + if rb.config.StringResourceAttrDisableWarning.Enabled { + rb.res.Attributes().PutStr("string.resource.attr_disable_warning", val) + } +} + +// SetStringResourceAttrRemoveWarning sets provided value as "string.resource.attr_remove_warning" attribute. +func (rb *ResourceBuilder) SetStringResourceAttrRemoveWarning(val string) { + if rb.config.StringResourceAttrRemoveWarning.Enabled { + rb.res.Attributes().PutStr("string.resource.attr_remove_warning", val) + } +} + +// SetStringResourceAttrToBeRemoved sets provided value as "string.resource.attr_to_be_removed" attribute. +func (rb *ResourceBuilder) SetStringResourceAttrToBeRemoved(val string) { + if rb.config.StringResourceAttrToBeRemoved.Enabled { + rb.res.Attributes().PutStr("string.resource.attr_to_be_removed", val) + } +} + +// Emit returns the built resource and resets the internal builder state. +func (rb *ResourceBuilder) Emit() pcommon.Resource { + r := rb.res + rb.res = pcommon.NewResource() + return r +} diff --git a/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_resource_test.go b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_resource_test.go new file mode 100644 index 00000000000..162e83a991a --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_resource_test.go @@ -0,0 +1,82 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestResourceBuilder(t *testing.T) { + for _, tt := range []string{"default", "all_set", "none_set"} { + t.Run(tt, func(t *testing.T) { + cfg := loadResourceAttributesConfig(t, tt) + rb := NewResourceBuilder(cfg) + rb.SetMapResourceAttr(map[string]any{"key1": "map.resource.attr-val1", "key2": "map.resource.attr-val2"}) + rb.SetOptionalResourceAttr("optional.resource.attr-val") + rb.SetSliceResourceAttr([]any{"slice.resource.attr-item1", "slice.resource.attr-item2"}) + rb.SetStringEnumResourceAttrOne() + rb.SetStringResourceAttr("string.resource.attr-val") + rb.SetStringResourceAttrDisableWarning("string.resource.attr_disable_warning-val") + rb.SetStringResourceAttrRemoveWarning("string.resource.attr_remove_warning-val") + rb.SetStringResourceAttrToBeRemoved("string.resource.attr_to_be_removed-val") + + res := rb.Emit() + assert.Equal(t, 0, rb.Emit().Attributes().Len()) // Second call should return empty Resource + + switch tt { + case "default": + assert.Equal(t, 6, res.Attributes().Len()) + case "all_set": + assert.Equal(t, 8, res.Attributes().Len()) + case "none_set": + assert.Equal(t, 0, res.Attributes().Len()) + return + default: + assert.Failf(t, "unexpected test case: %s", tt) + } + + val, ok := res.Attributes().Get("map.resource.attr") + assert.True(t, ok) + if ok { + assert.EqualValues(t, map[string]any{"key1": "map.resource.attr-val1", "key2": "map.resource.attr-val2"}, val.Map().AsRaw()) + } + val, ok = res.Attributes().Get("optional.resource.attr") + assert.Equal(t, tt == "all_set", ok) + if ok { + assert.EqualValues(t, "optional.resource.attr-val", val.Str()) + } + val, ok = res.Attributes().Get("slice.resource.attr") + assert.True(t, ok) + if ok { + assert.EqualValues(t, []any{"slice.resource.attr-item1", "slice.resource.attr-item2"}, val.Slice().AsRaw()) + } + val, ok = res.Attributes().Get("string.enum.resource.attr") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "one", val.Str()) + } + val, ok = res.Attributes().Get("string.resource.attr") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "string.resource.attr-val", val.Str()) + } + val, ok = res.Attributes().Get("string.resource.attr_disable_warning") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "string.resource.attr_disable_warning-val", val.Str()) + } + val, ok = res.Attributes().Get("string.resource.attr_remove_warning") + assert.Equal(t, tt == "all_set", ok) + if ok { + assert.EqualValues(t, "string.resource.attr_remove_warning-val", val.Str()) + } + val, ok = res.Attributes().Get("string.resource.attr_to_be_removed") + assert.True(t, ok) + if ok { + assert.EqualValues(t, "string.resource.attr_to_be_removed-val", val.Str()) + } + }) + } +} diff --git a/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_status.go b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_status.go new file mode 100644 index 00000000000..7f86f1d8fc1 --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/generated_status.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("sample") + ScopeName = "go.opentelemetry.io/collector/internal/receiver/samplereceiver" +) + +const ( + LogsStability = component.StabilityLevelDevelopment + TracesStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelStable +) diff --git a/cmd/mdatagen/internal/sampleprocessor/internal/metadata/testdata/config.yaml b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/testdata/config.yaml new file mode 100644 index 00000000000..bcc1a519f60 --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/internal/metadata/testdata/config.yaml @@ -0,0 +1,37 @@ +default: +all_set: + resource_attributes: + map.resource.attr: + enabled: true + optional.resource.attr: + enabled: true + slice.resource.attr: + enabled: true + string.enum.resource.attr: + enabled: true + string.resource.attr: + enabled: true + string.resource.attr_disable_warning: + enabled: true + string.resource.attr_remove_warning: + enabled: true + string.resource.attr_to_be_removed: + enabled: true +none_set: + resource_attributes: + map.resource.attr: + enabled: false + optional.resource.attr: + enabled: false + slice.resource.attr: + enabled: false + string.enum.resource.attr: + enabled: false + string.resource.attr: + enabled: false + string.resource.attr_disable_warning: + enabled: false + string.resource.attr_remove_warning: + enabled: false + string.resource.attr_to_be_removed: + enabled: false diff --git a/cmd/mdatagen/internal/sampleprocessor/metadata.yaml b/cmd/mdatagen/internal/sampleprocessor/metadata.yaml new file mode 100644 index 00000000000..521bd62c452 --- /dev/null +++ b/cmd/mdatagen/internal/sampleprocessor/metadata.yaml @@ -0,0 +1,68 @@ +# Sample metadata file with all available configurations for a receiver. + +type: sample +scope_name: go.opentelemetry.io/collector/internal/receiver/samplereceiver +github_project: open-telemetry/opentelemetry-collector + +sem_conv_version: 1.9.0 + +status: + class: processor + stability: + development: [logs] + beta: [traces] + stable: [metrics] + distributions: [] + unsupported_platforms: [freebsd, illumos] + codeowners: + active: [some] + warnings: + - Any additional information that should be brought to the consumer's attention + +resource_attributes: + string.resource.attr: + description: Resource attribute with any string value. + type: string + enabled: true + + string.enum.resource.attr: + description: Resource attribute with a known set of string values. + type: string + enum: [one, two] + enabled: true + + optional.resource.attr: + description: Explicitly disabled ResourceAttribute. + type: string + enabled: false + + slice.resource.attr: + description: Resource attribute with a slice value. + type: slice + enabled: true + + map.resource.attr: + description: Resource attribute with a map value. + type: map + enabled: true + + string.resource.attr_disable_warning: + description: Resource attribute with any string value. + type: string + enabled: true + warnings: + if_enabled_not_set: This resource_attribute will be disabled by default soon. + + string.resource.attr_remove_warning: + description: Resource attribute with any string value. + type: string + enabled: false + warnings: + if_configured: This resource_attribute is deprecated and will be removed soon. + + string.resource.attr_to_be_removed: + description: Resource attribute with any string value. + type: string + enabled: true + warnings: + if_enabled: This resource_attribute is deprecated and will be removed soon. From 9d6a84e0b86f79ce3b6b69f7e0d6f8d25f07021d Mon Sep 17 00:00:00 2001 From: Pablo Baeyens Date: Fri, 4 Oct 2024 17:05:51 +0200 Subject: [PATCH 07/14] [cmd/builder] Update default configuration to use v1.17.0 (#11357) #### Description Update default configuration to use v1.17.0 for confmap providers. #### Link to tracking issue This is what is making open-telemetry/opentelemetry-collector-contrib#35605 fail --- .../mx-psi_update-default-builder-config.yaml | 25 +++++++++++++++++++ cmd/builder/internal/config/default.yaml | 6 ++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 .chloggen/mx-psi_update-default-builder-config.yaml diff --git a/.chloggen/mx-psi_update-default-builder-config.yaml b/.chloggen/mx-psi_update-default-builder-config.yaml new file mode 100644 index 00000000000..79d915790f3 --- /dev/null +++ b/.chloggen/mx-psi_update-default-builder-config.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: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: cmd/builder + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix default configuration for builder for httpprovider, httpsprovider, and yamlprovider. + +# One or more tracking issues or pull requests related to the change +issues: [11357] + +# (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/cmd/builder/internal/config/default.yaml b/cmd/builder/internal/config/default.yaml index ed9898a613d..0c251ad7564 100644 --- a/cmd/builder/internal/config/default.yaml +++ b/cmd/builder/internal/config/default.yaml @@ -33,7 +33,7 @@ connectors: providers: - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.17.0 - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.17.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v0.111.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.111.0 - - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.111.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v1.17.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.17.0 + - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.17.0 From 13951af284f61c3ab88d1e7e9af2de5ce084cafe Mon Sep 17 00:00:00 2001 From: Juliano Costa Date: Fri, 4 Oct 2024 17:24:52 +0200 Subject: [PATCH 08/14] [chore]: Add Profiles Marshaler to otlptext (#11161) #### Description This is the initial work towards #11155. This PR adds profiles marshalers to `otlptext`, which will be used in the `debugexporter` later on. To continue the work on the `debugexporter` I'd wait on the PR #11131, as it adds some shared components. #### Testing Added `TestProfilesText`, testing the following scenarios: - `empty_profiles` - `two_profiles` --- exporter/internal/otlptext/databuffer.go | 160 ++++++++++++++++++ exporter/internal/otlptext/profiles.go | 74 ++++++++ exporter/internal/otlptext/profiles_test.go | 119 +++++++++++++ .../otlptext/testdata/profiles/empty.out | 0 .../testdata/profiles/two_profiles.out | 84 +++++++++ 5 files changed, 437 insertions(+) create mode 100644 exporter/internal/otlptext/profiles.go create mode 100644 exporter/internal/otlptext/profiles_test.go create mode 100644 exporter/internal/otlptext/testdata/profiles/empty.out create mode 100644 exporter/internal/otlptext/testdata/profiles/two_profiles.out diff --git a/exporter/internal/otlptext/databuffer.go b/exporter/internal/otlptext/databuffer.go index cf7fd630e78..32f59220266 100644 --- a/exporter/internal/otlptext/databuffer.go +++ b/exporter/internal/otlptext/databuffer.go @@ -11,6 +11,7 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" ) @@ -47,6 +48,28 @@ func (b *dataBuffer) logAttributes(header string, m pcommon.Map) { }) } +func (b *dataBuffer) logAttributesWithIndentation(header string, m pcommon.Map, indentVal int) { + if m.Len() == 0 { + return + } + + indent := strings.Repeat(" ", indentVal) + + b.logEntry("%s%s:", indent, header) + attrPrefix := indent + " ->" + + // Add offset to attributes if needed. + headerParts := strings.Split(header, "->") + if len(headerParts) > 1 { + attrPrefix = headerParts[0] + attrPrefix + } + + m.Range(func(k string, v pcommon.Value) bool { + b.logEntry("%s %s: %s", attrPrefix, k, valueToString(v)) + return true + }) +} + func (b *dataBuffer) logInstrumentationScope(il pcommon.InstrumentationScope) { b.logEntry( "InstrumentationScope %s %s", @@ -280,6 +303,143 @@ func (b *dataBuffer) logExemplars(description string, se pmetric.ExemplarSlice) } } +func (b *dataBuffer) logProfileSamples(ss pprofile.SampleSlice) { + if ss.Len() == 0 { + return + } + + for i := 0; i < ss.Len(); i++ { + b.logEntry(" Sample #%d", i) + sample := ss.At(i) + + b.logEntry(" Location index: %d", sample.LocationIndex().AsRaw()) + b.logEntry(" Location length: %d", sample.LocationsLength()) + b.logEntry(" Stacktrace ID index: %d", sample.StacktraceIdIndex()) + if lb := sample.Label().Len(); lb > 0 { + for j := 0; j < lb; j++ { + b.logEntry(" Label #%d", j) + b.logEntry(" -> Key: %d", sample.Label().At(j).Key()) + b.logEntry(" -> Str: %d", sample.Label().At(j).Str()) + b.logEntry(" -> Num: %d", sample.Label().At(j).Num()) + b.logEntry(" -> Num unit: %d", sample.Label().At(j).NumUnit()) + } + } + b.logEntry(" Value: %d", sample.Value().AsRaw()) + b.logEntry(" Attributes: %d", sample.Attributes().AsRaw()) + b.logEntry(" Link: %d", sample.Link()) + } +} + +func (b *dataBuffer) logProfileMappings(ms pprofile.MappingSlice) { + if ms.Len() == 0 { + return + } + + for i := 0; i < ms.Len(); i++ { + b.logEntry(" Mapping #%d", i) + mapping := ms.At(i) + + b.logEntry(" ID: %d", mapping.ID()) + b.logEntry(" Memory start: %d", mapping.MemoryStart()) + b.logEntry(" Memory limit: %d", mapping.MemoryLimit()) + b.logEntry(" File offset: %d", mapping.FileOffset()) + b.logEntry(" File name: %d", mapping.Filename()) + b.logEntry(" Build ID: %d", mapping.BuildID()) + b.logEntry(" Attributes: %d", mapping.Attributes().AsRaw()) + b.logEntry(" Has functions: %t", mapping.HasFunctions()) + b.logEntry(" Has filenames: %t", mapping.HasFilenames()) + b.logEntry(" Has line numbers: %t", mapping.HasLineNumbers()) + b.logEntry(" Has inline frames: %t", mapping.HasInlineFrames()) + + } +} + +func (b *dataBuffer) logProfileLocations(ls pprofile.LocationSlice) { + if ls.Len() == 0 { + return + } + + for i := 0; i < ls.Len(); i++ { + b.logEntry(" Location #%d", i) + location := ls.At(i) + + b.logEntry(" ID: %d", location.ID()) + b.logEntry(" Mapping index: %d", location.MappingIndex()) + b.logEntry(" Address: %d", location.Address()) + if ll := location.Line().Len(); ll > 0 { + for j := 0; j < ll; j++ { + b.logEntry(" Line #%d", j) + line := location.Line().At(j) + b.logEntry(" Function index: %d", line.FunctionIndex()) + b.logEntry(" Line: %d", line.Line()) + b.logEntry(" Column: %d", line.Column()) + } + } + b.logEntry(" Is folded: %t", location.IsFolded()) + b.logEntry(" Type index: %d", location.TypeIndex()) + b.logEntry(" Attributes: %d", location.Attributes().AsRaw()) + } +} + +func (b *dataBuffer) logProfileFunctions(fs pprofile.FunctionSlice) { + if fs.Len() == 0 { + return + } + + for i := 0; i < fs.Len(); i++ { + b.logEntry(" Function #%d", i) + function := fs.At(i) + + b.logEntry(" ID: %d", function.ID()) + b.logEntry(" Name: %d", function.Name()) + b.logEntry(" System name: %d", function.SystemName()) + b.logEntry(" Filename: %d", function.Filename()) + b.logEntry(" Start line: %d", function.StartLine()) + } +} + +func (b *dataBuffer) logStringTable(ss pcommon.StringSlice) { + if ss.Len() == 0 { + return + } + + b.logEntry(" String table:") + for i := 0; i < ss.Len(); i++ { + b.logEntry(" %s", ss.At(i)) + } +} + +func (b *dataBuffer) logComment(c pcommon.Int64Slice) { + if c.Len() == 0 { + return + } + + b.logEntry(" Comment:") + for i := 0; i < c.Len(); i++ { + b.logEntry(" %d", c.At(i)) + } +} + +func attributeUnitsToMap(aus pprofile.AttributeUnitSlice) pcommon.Map { + m := pcommon.NewMap() + for i := 0; i < aus.Len(); i++ { + au := aus.At(i) + m.PutInt("attributeKey", au.AttributeKey()) + m.PutInt("unit", au.Unit()) + } + return m +} + +func linkTableToMap(ls pprofile.LinkSlice) pcommon.Map { + m := pcommon.NewMap() + for i := 0; i < ls.Len(); i++ { + l := ls.At(i) + m.PutStr("Trace ID", l.TraceID().String()) + m.PutStr("Span ID", l.SpanID().String()) + } + return m +} + func valueToString(v pcommon.Value) string { return fmt.Sprintf("%s(%s)", v.Type().String(), v.AsString()) } diff --git a/exporter/internal/otlptext/profiles.go b/exporter/internal/otlptext/profiles.go new file mode 100644 index 00000000000..d0d52640ac1 --- /dev/null +++ b/exporter/internal/otlptext/profiles.go @@ -0,0 +1,74 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlptext // import "go.opentelemetry.io/collector/exporter/internal/otlptext" + +import ( + "strconv" + + "go.opentelemetry.io/collector/pdata/pprofile" +) + +// NewTextProfilesMarshaler returns a pprofile.Marshaler to encode to OTLP text bytes. +func NewTextProfilesMarshaler() pprofile.Marshaler { + return textProfilesMarshaler{} +} + +type textProfilesMarshaler struct{} + +// MarshalProfiles pprofile.Profiles to OTLP text. +func (textProfilesMarshaler) MarshalProfiles(pd pprofile.Profiles) ([]byte, error) { + buf := dataBuffer{} + rps := pd.ResourceProfiles() + for i := 0; i < rps.Len(); i++ { + buf.logEntry("ResourceProfiles #%d", i) + rp := rps.At(i) + buf.logEntry("Resource SchemaURL: %s", rp.SchemaUrl()) + buf.logAttributes("Resource attributes", rp.Resource().Attributes()) + ilps := rp.ScopeProfiles() + for j := 0; j < ilps.Len(); j++ { + buf.logEntry("ScopeProfiles #%d", j) + ilp := ilps.At(j) + buf.logEntry("ScopeProfiles SchemaURL: %s", ilp.SchemaUrl()) + buf.logInstrumentationScope(ilp.Scope()) + profiles := ilp.Profiles() + for k := 0; k < profiles.Len(); k++ { + buf.logEntry("Profile #%d", k) + profile := profiles.At(k) + buf.logAttr("Profile ID", profile.ProfileID()) + buf.logAttr("Start time", profile.StartTime().String()) + buf.logAttr("End time", profile.EndTime().String()) + buf.logAttributes("Attributes", profile.Attributes()) + buf.logAttr("Dropped attributes count", strconv.FormatUint(uint64(profile.DroppedAttributesCount()), 10)) + buf.logEntry(" Location indices: %d", profile.Profile().LocationIndices().AsRaw()) + buf.logEntry(" Drop frames: %d", profile.Profile().DropFrames()) + buf.logEntry(" Keep frames: %d", profile.Profile().KeepFrames()) + + buf.logProfileSamples(profile.Profile().Sample()) + buf.logProfileMappings(profile.Profile().Mapping()) + buf.logProfileLocations(profile.Profile().Location()) + buf.logProfileFunctions(profile.Profile().Function()) + + buf.logAttributesWithIndentation( + "Attribute table", + profile.Profile().AttributeTable(), + 4) + + buf.logAttributesWithIndentation( + "Attribute units", + attributeUnitsToMap(profile.Profile().AttributeUnits()), + 4) + + buf.logAttributesWithIndentation( + "Link table", + linkTableToMap(profile.Profile().LinkTable()), + 4) + + buf.logStringTable(profile.Profile().StringTable()) + buf.logComment(profile.Profile().Comment()) + } + } + } + + return buf.buf.Bytes(), nil +} diff --git a/exporter/internal/otlptext/profiles_test.go b/exporter/internal/otlptext/profiles_test.go new file mode 100644 index 00000000000..0a44252b3a9 --- /dev/null +++ b/exporter/internal/otlptext/profiles_test.go @@ -0,0 +1,119 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package otlptext + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "go.opentelemetry.io/collector/pdata/pprofile" + "go.opentelemetry.io/collector/pdata/testdata" +) + +func TestProfilesText(t *testing.T) { + tests := []struct { + name string + in pprofile.Profiles + out string + }{ + { + name: "empty_profiles", + in: pprofile.NewProfiles(), + out: "empty.out", + }, + { + name: "two_profiles", + in: extendProfiles(testdata.GenerateProfiles(2)), + out: "two_profiles.out", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := NewTextProfilesMarshaler().MarshalProfiles(tt.in) + require.NoError(t, err) + out, err := os.ReadFile(filepath.Join("testdata", "profiles", tt.out)) + require.NoError(t, err) + expected := strings.ReplaceAll(string(out), "\r", "") + assert.Equal(t, expected, string(got)) + }) + } +} + +// GenerateExtendedProfiles generates dummy profiling data with extended values for tests +func extendProfiles(profiles pprofile.Profiles) pprofile.Profiles { + sc := profiles.ResourceProfiles().At(0).ScopeProfiles().At(0) + profilesCount := profiles.ResourceProfiles().At(0).ScopeProfiles().At(0).Profiles().Len() + for i := 0; i < profilesCount; i++ { + switch i % 2 { + case 0: + profile := sc.Profiles().At(i) + profile.Profile().LocationIndices().FromRaw([]int64{1}) + label := profile.Profile().Sample().At(0).Label().AppendEmpty() + label.SetKey(1) + label.SetStr(2) + label.SetNum(3) + label.SetNumUnit(4) + + location := profile.Profile().Location().AppendEmpty() + location.SetID(2) + location.SetMappingIndex(3) + location.SetAddress(4) + line := location.Line().AppendEmpty() + line.SetFunctionIndex(1) + line.SetLine(2) + line.SetColumn(3) + location.SetIsFolded(true) + location.SetTypeIndex(5) + location.Attributes().FromRaw([]uint64{6, 7}) + + _ = profile.Profile().AttributeTable().FromRaw(map[string]any{ + "value": map[string]any{ + "intValue": "42", + }, + }) + + attributeUnits := profile.Profile().AttributeUnits().AppendEmpty() + attributeUnits.SetAttributeKey(1) + attributeUnits.SetUnit(5) + + profile.Profile().StringTable().Append("foobar") + case 1: + profile := sc.Profiles().At(i) + profile.Profile().SetDropFrames(1) + profile.Profile().SetKeepFrames(2) + + mapping := profile.Profile().Mapping().AppendEmpty() + mapping.SetID(1) + mapping.SetMemoryStart(2) + mapping.SetMemoryLimit(3) + mapping.SetFileOffset(4) + mapping.SetFilename(5) + mapping.SetBuildID(6) + mapping.Attributes().FromRaw([]uint64{7, 8}) + mapping.SetHasFunctions(true) + mapping.SetHasFilenames(true) + mapping.SetHasLineNumbers(true) + mapping.SetHasInlineFrames(true) + + function := profile.Profile().Function().AppendEmpty() + function.SetID(1) + function.SetName(2) + function.SetSystemName(3) + function.SetFilename(4) + function.SetStartLine(5) + + linkTable := profile.Profile().LinkTable().AppendEmpty() + linkTable.SetTraceID([16]byte{0x03, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10}) + linkTable.SetSpanID([8]byte{0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}) + + profile.Profile().Comment().FromRaw([]int64{1, 2}) + } + } + return profiles +} diff --git a/exporter/internal/otlptext/testdata/profiles/empty.out b/exporter/internal/otlptext/testdata/profiles/empty.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/exporter/internal/otlptext/testdata/profiles/two_profiles.out b/exporter/internal/otlptext/testdata/profiles/two_profiles.out new file mode 100644 index 00000000000..81ef23433b4 --- /dev/null +++ b/exporter/internal/otlptext/testdata/profiles/two_profiles.out @@ -0,0 +1,84 @@ +ResourceProfiles #0 +Resource SchemaURL: +Resource attributes: + -> resource-attr: Str(resource-attr-val-1) +ScopeProfiles #0 +ScopeProfiles SchemaURL: +InstrumentationScope +Profile #0 + Profile ID : 0102030405060708090a0b0c0d0e0f10 + Start time : 2020-02-11 20:26:12.000000321 +0000 UTC + End time : 2020-02-11 20:26:13.000000789 +0000 UTC + Dropped attributes count: 1 + Location indices: [1] + Drop frames: 0 + Keep frames: 0 + Sample #0 + Location index: [1] + Location length: 10 + Stacktrace ID index: 3 + Label #0 + -> Key: 1 + -> Str: 2 + -> Num: 3 + -> Num unit: 4 + Value: [4] + Attributes: [5] + Link: 42 + Location #0 + ID: 2 + Mapping index: 3 + Address: 4 + Line #0 + Function index: 1 + Line: 2 + Column: 3 + Is folded: true + Type index: 5 + Attributes: [6 7] + Attribute table: + -> value: Map({"intValue":"42"}) + Attribute units: + -> attributeKey: Int(1) + -> unit: Int(5) + String table: + foobar +Profile #1 + Profile ID : 0202030405060708090a0b0c0d0e0f10 + Start time : 2020-02-11 20:26:12.000000321 +0000 UTC + End time : 2020-02-11 20:26:13.000000789 +0000 UTC + Dropped attributes count: 0 + Location indices: [] + Drop frames: 1 + Keep frames: 2 + Sample #0 + Location index: [6] + Location length: 20 + Stacktrace ID index: 8 + Value: [9] + Attributes: [10] + Link: 44 + Mapping #0 + ID: 1 + Memory start: 2 + Memory limit: 3 + File offset: 4 + File name: 5 + Build ID: 6 + Attributes: [7 8] + Has functions: true + Has filenames: true + Has line numbers: true + Has inline frames: true + Function #0 + ID: 1 + Name: 2 + System name: 3 + Filename: 4 + Start line: 5 + Link table: + -> Trace ID: Str(0302030405060708090a0b0c0d0e0f10) + -> Span ID: Str(1112131415161718) + Comment: + 1 + 2 From 0e9f548fcd7709149426e4ce4dd7c7de7e1d8296 Mon Sep 17 00:00:00 2001 From: Jade Guiton Date: Fri, 4 Oct 2024 17:52:09 +0200 Subject: [PATCH 09/14] [configgrpc] Remove deprecated aliases (#11359) #### Description This PR removes `ClientConfig.ToClientConnWithOptions`/`ServerConfig.ToServerWithOptions`, deprecated aliases of `ClientConfig.ToClientConn`/`ServerConfig.ToServer`, which were introduced in v0.111.0. This was part of the three step process to change the option type used by these methods (introduce new methods using the new option type and deprecate the old ones / remove old methods, rename new methods to the old names, add deprecated aliases for the new names / remove aliases). #### Link to tracking issue Fixes #9480 --- .chloggen/configgrpc-remove-deprecated.yaml | 25 +++++++++++++++++++++ config/configgrpc/configgrpc.go | 24 -------------------- 2 files changed, 25 insertions(+), 24 deletions(-) create mode 100644 .chloggen/configgrpc-remove-deprecated.yaml diff --git a/.chloggen/configgrpc-remove-deprecated.yaml b/.chloggen/configgrpc-remove-deprecated.yaml new file mode 100644 index 00000000000..ccdd3ca63b7 --- /dev/null +++ b/.chloggen/configgrpc-remove-deprecated.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: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: configgrpc + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Removed deprecated `ClientConfig.ToClientConnWithOptions`/`ServerConfig.ToServerWithOptions`. + +# One or more tracking issues or pull requests related to the change +issues: [11359, 9480] + +# (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: "These methods were renamed to `ClientConfig.ToClientConn`/`ServerConfig.ToServer` in v0.111.0." + +# 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: [api] diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index 53bfbf79e69..831573115d2 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -264,18 +264,6 @@ func (gcs *ClientConfig) ToClientConn( return grpc.NewClient(gcs.sanitizedEndpoint(), grpcOpts...) } -// ToClientConnWithOptions is the same as [ClientConfig.ToClientConn]. -// -// Deprecated: [v0.111.0] Use [ClientConfig.ToClientConn] instead. -func (gcs *ClientConfig) ToClientConnWithOptions( - ctx context.Context, - host component.Host, - settings component.TelemetrySettings, - extraOpts ...ToClientConnOption, -) (*grpc.ClientConn, error) { - return gcs.ToClientConn(ctx, host, settings, extraOpts...) -} - func (gcs *ClientConfig) getGrpcDialOptions( ctx context.Context, host component.Host, @@ -408,18 +396,6 @@ func (gss *ServerConfig) ToServer( return grpc.NewServer(grpcOpts...), nil } -// ToServerWithOptions is the same as [ServerConfig.ToServer]. -// -// Deprecated: [v0.111.0] Use [ServerConfig.ToServer] instead. -func (gss *ServerConfig) ToServerWithOptions( - ctx context.Context, - host component.Host, - settings component.TelemetrySettings, - extraOpts ...ToServerOption, -) (*grpc.Server, error) { - return gss.ToServer(ctx, host, settings, extraOpts...) -} - func (gss *ServerConfig) getGrpcServerOptions( host component.Host, settings component.TelemetrySettings, From d547b39b4f30ee41e5cfc4c233e775670ad1d052 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 4 Oct 2024 11:55:59 -0600 Subject: [PATCH 10/14] [receivertest] Remove deprecated function (#11362) #### Description Remove deprecated function #### Link to tracking issue Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9429 --- .../receivertest-remove-deprecations.yaml | 25 +++++++++++++++++++ receiver/receivertest/nop_receiver.go | 8 ------ 2 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 .chloggen/receivertest-remove-deprecations.yaml diff --git a/.chloggen/receivertest-remove-deprecations.yaml b/.chloggen/receivertest-remove-deprecations.yaml new file mode 100644 index 00000000000..f79ec4545cc --- /dev/null +++ b/.chloggen/receivertest-remove-deprecations.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: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: receivertest + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Removed deprecated `NewNopFactoryForTypeWithSignal`. Use `NewNopFactoryForType` instead. + +# One or more tracking issues or pull requests related to the change +issues: [11362] + +# (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: [api] diff --git a/receiver/receivertest/nop_receiver.go b/receiver/receivertest/nop_receiver.go index e57c41acde4..973c36dffae 100644 --- a/receiver/receivertest/nop_receiver.go +++ b/receiver/receivertest/nop_receiver.go @@ -59,14 +59,6 @@ func NewNopFactoryForType(signal pipeline.Signal) receiver.Factory { return receiver.NewFactory(componentType, func() component.Config { return &nopConfig{} }, factoryOpt) } -// NewNopFactoryForTypeWithSignal returns a receiver.Factory that constructs nop receivers supporting only the -// given signal. -// -// Deprecated: [v0.111.0] Use NewNopFactoryForType instead -func NewNopFactoryForTypeWithSignal(signal pipeline.Signal) receiver.Factory { - return NewNopFactoryForType(signal) -} - type nopConfig struct{} func createTraces(context.Context, receiver.Settings, component.Config, consumer.Traces) (receiver.Traces, error) { From 6a8c88d68fc214d54f374ad6d0025fd14fcba2c4 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Fri, 4 Oct 2024 11:04:25 -0700 Subject: [PATCH 11/14] [chore] Improve otel metrics performance, pre-calculate attribute Set (#11288) Depends on https://github.com/open-telemetry/opentelemetry-collector/pull/11293 Signed-off-by: Bogdan Drutu --- .../exporterhelper/internal/obsexporter.go | 18 ++++++++---------- processor/processorhelper/obsreport.go | 14 ++++++++------ receiver/receiverhelper/obsreport.go | 10 +++++----- receiver/scraperhelper/obsreport.go | 10 +++++----- service/telemetry/internal/otelinit/config.go | 15 +++++++-------- service/telemetry/metrics_test.go | 4 ++-- 6 files changed, 35 insertions(+), 36 deletions(-) diff --git a/exporter/exporterhelper/internal/obsexporter.go b/exporter/exporterhelper/internal/obsexporter.go index 0805c5ac542..d6c3d841be3 100644 --- a/exporter/exporterhelper/internal/obsexporter.go +++ b/exporter/exporterhelper/internal/obsexporter.go @@ -23,7 +23,7 @@ type ObsReport struct { tracer trace.Tracer Signal pipeline.Signal - otelAttrs []attribute.KeyValue + otelAttrs attribute.Set TelemetryBuilder *metadata.TelemetryBuilder } @@ -41,12 +41,10 @@ func NewExporter(cfg ObsReportSettings) (*ObsReport, error) { } return &ObsReport{ - spanNamePrefix: ExporterPrefix + cfg.ExporterID.String(), - tracer: cfg.ExporterCreateSettings.TracerProvider.Tracer(cfg.ExporterID.String()), - Signal: cfg.Signal, - otelAttrs: []attribute.KeyValue{ - attribute.String(ExporterKey, cfg.ExporterID.String()), - }, + spanNamePrefix: ExporterPrefix + cfg.ExporterID.String(), + tracer: cfg.ExporterCreateSettings.TracerProvider.Tracer(cfg.ExporterID.String()), + Signal: cfg.Signal, + otelAttrs: attribute.NewSet(attribute.String(ExporterKey, cfg.ExporterID.String())), TelemetryBuilder: telemetryBuilder, }, nil } @@ -118,8 +116,8 @@ func (or *ObsReport) recordMetrics(ctx context.Context, signal pipeline.Signal, failedMeasure = or.TelemetryBuilder.ExporterSendFailedLogRecords } - sentMeasure.Add(ctx, sent, metric.WithAttributes(or.otelAttrs...)) - failedMeasure.Add(ctx, failed, metric.WithAttributes(or.otelAttrs...)) + sentMeasure.Add(ctx, sent, metric.WithAttributeSet(or.otelAttrs)) + failedMeasure.Add(ctx, failed, metric.WithAttributeSet(or.otelAttrs)) } func endSpan(ctx context.Context, err error, numSent, numFailedToSend int64, sentItemsKey, failedToSendItemsKey string) { @@ -155,5 +153,5 @@ func (or *ObsReport) RecordEnqueueFailure(ctx context.Context, signal pipeline.S enqueueFailedMeasure = or.TelemetryBuilder.ExporterEnqueueFailedLogRecords } - enqueueFailedMeasure.Add(ctx, failed, metric.WithAttributes(or.otelAttrs...)) + enqueueFailedMeasure.Add(ctx, failed, metric.WithAttributeSet(or.otelAttrs)) } diff --git a/processor/processorhelper/obsreport.go b/processor/processorhelper/obsreport.go index fd95f51fb9d..7bee8e086b2 100644 --- a/processor/processorhelper/obsreport.go +++ b/processor/processorhelper/obsreport.go @@ -17,6 +17,8 @@ import ( "go.opentelemetry.io/collector/processor/processorhelper/internal/metadata" ) +const signalKey = "otel.signal" + // Deprecated: [v0.111.0] no longer needed. To be removed in future. func BuildCustomMetricName(configType, metric string) string { componentPrefix := internal.ProcessorMetricPrefix @@ -44,7 +46,7 @@ func NewObsReport(_ ObsReportSettings) (*ObsReport, error) { } type obsReport struct { - otelAttrs []attribute.KeyValue + otelAttrs attribute.Set telemetryBuilder *metadata.TelemetryBuilder } @@ -54,15 +56,15 @@ func newObsReport(set processor.Settings, signal pipeline.Signal) (*obsReport, e return nil, err } return &obsReport{ - otelAttrs: []attribute.KeyValue{ + otelAttrs: attribute.NewSet( attribute.String(internal.ProcessorKey, set.ID.String()), - attribute.String("otel.signal", signal.String()), - }, + attribute.String(signalKey, signal.String()), + ), telemetryBuilder: telemetryBuilder, }, nil } func (or *obsReport) recordInOut(ctx context.Context, incoming, outgoing int) { - or.telemetryBuilder.ProcessorIncomingItems.Add(ctx, int64(incoming), metric.WithAttributes(or.otelAttrs...)) - or.telemetryBuilder.ProcessorOutgoingItems.Add(ctx, int64(outgoing), metric.WithAttributes(or.otelAttrs...)) + or.telemetryBuilder.ProcessorIncomingItems.Add(ctx, int64(incoming), metric.WithAttributeSet(or.otelAttrs)) + or.telemetryBuilder.ProcessorOutgoingItems.Add(ctx, int64(outgoing), metric.WithAttributeSet(or.otelAttrs)) } diff --git a/receiver/receiverhelper/obsreport.go b/receiver/receiverhelper/obsreport.go index c92c464ff53..b483c19be3f 100644 --- a/receiver/receiverhelper/obsreport.go +++ b/receiver/receiverhelper/obsreport.go @@ -27,7 +27,7 @@ type ObsReport struct { longLivedCtx bool tracer trace.Tracer - otelAttrs []attribute.KeyValue + otelAttrs attribute.Set telemetryBuilder *metadata.TelemetryBuilder } @@ -60,10 +60,10 @@ func newReceiver(cfg ObsReportSettings) (*ObsReport, error) { longLivedCtx: cfg.LongLivedCtx, tracer: cfg.ReceiverCreateSettings.TracerProvider.Tracer(cfg.ReceiverID.String()), - otelAttrs: []attribute.KeyValue{ + otelAttrs: attribute.NewSet( attribute.String(internal.ReceiverKey, cfg.ReceiverID.String()), attribute.String(internal.TransportKey, cfg.Transport), - }, + ), telemetryBuilder: telemetryBuilder, }, nil } @@ -207,6 +207,6 @@ func (rec *ObsReport) recordMetrics(receiverCtx context.Context, signal pipeline refusedMeasure = rec.telemetryBuilder.ReceiverRefusedLogRecords } - acceptedMeasure.Add(receiverCtx, int64(numAccepted), metric.WithAttributes(rec.otelAttrs...)) - refusedMeasure.Add(receiverCtx, int64(numRefused), metric.WithAttributes(rec.otelAttrs...)) + acceptedMeasure.Add(receiverCtx, int64(numAccepted), metric.WithAttributeSet(rec.otelAttrs)) + refusedMeasure.Add(receiverCtx, int64(numRefused), metric.WithAttributeSet(rec.otelAttrs)) } diff --git a/receiver/scraperhelper/obsreport.go b/receiver/scraperhelper/obsreport.go index cce7f49478e..0424cde39bc 100644 --- a/receiver/scraperhelper/obsreport.go +++ b/receiver/scraperhelper/obsreport.go @@ -26,7 +26,7 @@ type obsReport struct { scraper component.ID tracer trace.Tracer - otelAttrs []attribute.KeyValue + otelAttrs attribute.Set telemetryBuilder *metadata.TelemetryBuilder } @@ -47,10 +47,10 @@ func newScraper(cfg obsReportSettings) (*obsReport, error) { scraper: cfg.Scraper, tracer: cfg.ReceiverCreateSettings.TracerProvider.Tracer(cfg.Scraper.String()), - otelAttrs: []attribute.KeyValue{ + otelAttrs: attribute.NewSet( attribute.String(internal.ReceiverKey, cfg.ReceiverID.String()), attribute.String(internal.ScraperKey, cfg.Scraper.String()), - }, + ), telemetryBuilder: telemetryBuilder, }, nil } @@ -103,6 +103,6 @@ func (s *obsReport) EndMetricsOp( } func (s *obsReport) recordMetrics(scraperCtx context.Context, numScrapedMetrics, numErroredMetrics int) { - s.telemetryBuilder.ScraperScrapedMetricPoints.Add(scraperCtx, int64(numScrapedMetrics), metric.WithAttributes(s.otelAttrs...)) - s.telemetryBuilder.ScraperErroredMetricPoints.Add(scraperCtx, int64(numErroredMetrics), metric.WithAttributes(s.otelAttrs...)) + s.telemetryBuilder.ScraperScrapedMetricPoints.Add(scraperCtx, int64(numScrapedMetrics), metric.WithAttributeSet(s.otelAttrs)) + s.telemetryBuilder.ScraperErroredMetricPoints.Add(scraperCtx, int64(numErroredMetrics), metric.WithAttributeSet(s.otelAttrs)) } diff --git a/service/telemetry/internal/otelinit/config.go b/service/telemetry/internal/otelinit/config.go index eec13808e64..a8983886038 100644 --- a/service/telemetry/internal/otelinit/config.go +++ b/service/telemetry/internal/otelinit/config.go @@ -48,17 +48,17 @@ const ( var ( // GRPCUnacceptableKeyValues is a list of high cardinality grpc attributes that should be filtered out. - GRPCUnacceptableKeyValues = []attribute.KeyValue{ + GRPCUnacceptableKeyValues = attribute.NewSet( attribute.String(semconv.AttributeNetSockPeerAddr, ""), attribute.String(semconv.AttributeNetSockPeerPort, ""), attribute.String(semconv.AttributeNetSockPeerName, ""), - } + ) // HTTPUnacceptableKeyValues is a list of high cardinality http attributes that should be filtered out. - HTTPUnacceptableKeyValues = []attribute.KeyValue{ + HTTPUnacceptableKeyValues = attribute.NewSet( attribute.String(semconv.AttributeNetHostName, ""), attribute.String(semconv.AttributeNetHostPort, ""), - } + ) errNoValidMetricExporter = errors.New("no valid metric exporter") ) @@ -123,18 +123,17 @@ func disableHighCardinalityViews(disableHighCardinality bool) []sdkmetric.View { sdkmetric.NewView( sdkmetric.Instrument{Scope: instrumentation.Scope{Name: GRPCInstrumentation}}, sdkmetric.Stream{ - AttributeFilter: cardinalityFilter(GRPCUnacceptableKeyValues...), + AttributeFilter: cardinalityFilter(GRPCUnacceptableKeyValues), }), sdkmetric.NewView( sdkmetric.Instrument{Scope: instrumentation.Scope{Name: HTTPInstrumentation}}, sdkmetric.Stream{ - AttributeFilter: cardinalityFilter(HTTPUnacceptableKeyValues...), + AttributeFilter: cardinalityFilter(HTTPUnacceptableKeyValues), }), } } -func cardinalityFilter(kvs ...attribute.KeyValue) attribute.Filter { - filter := attribute.NewSet(kvs...) +func cardinalityFilter(filter attribute.Set) attribute.Filter { return func(kv attribute.KeyValue) bool { return !filter.HasValue(kv.Key) } diff --git a/service/telemetry/metrics_test.go b/service/telemetry/metrics_test.go index 3446ad219d6..1f012b00b29 100644 --- a/service/telemetry/metrics_test.go +++ b/service/telemetry/metrics_test.go @@ -258,11 +258,11 @@ func createTestMetrics(t *testing.T, mp metric.MeterProvider) { grpcExampleCounter, err := mp.Meter(otelinit.GRPCInstrumentation).Int64Counter(metricPrefix + grpcPrefix + counterName) require.NoError(t, err) - grpcExampleCounter.Add(context.Background(), 11, metric.WithAttributes(otelinit.GRPCUnacceptableKeyValues...)) + grpcExampleCounter.Add(context.Background(), 11, metric.WithAttributeSet(otelinit.GRPCUnacceptableKeyValues)) httpExampleCounter, err := mp.Meter(otelinit.HTTPInstrumentation).Int64Counter(metricPrefix + httpPrefix + counterName) require.NoError(t, err) - httpExampleCounter.Add(context.Background(), 10, metric.WithAttributes(otelinit.HTTPUnacceptableKeyValues...)) + httpExampleCounter.Add(context.Background(), 10, metric.WithAttributeSet(otelinit.HTTPUnacceptableKeyValues)) } func getMetricsFromPrometheus(t *testing.T, handler http.Handler) map[string]*io_prometheus_client.MetricFamily { From c5d9bbe0dc1a6285dc7849b2ed060eaaa1769167 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 4 Oct 2024 12:07:57 -0600 Subject: [PATCH 12/14] [componentstatus] Remove deprecated functions (#11363) #### Description Removes deprecated functions #### Link to tracking issue Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9429 --- ...mponentstatus-remove-deprecated-funcs.yaml | 25 +++++++++++++++++++ component/componentstatus/instance.go | 23 ----------------- 2 files changed, 25 insertions(+), 23 deletions(-) create mode 100644 .chloggen/componentstatus-remove-deprecated-funcs.yaml diff --git a/.chloggen/componentstatus-remove-deprecated-funcs.yaml b/.chloggen/componentstatus-remove-deprecated-funcs.yaml new file mode 100644 index 00000000000..7ec63839607 --- /dev/null +++ b/.chloggen/componentstatus-remove-deprecated-funcs.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: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: componentstatus + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove deprecated `NewInstanceIDWithPipelineIDs`, `AllPipelineIDsWithPipelineIDs`, and `WithPipelineIDs`. Use `NewInstanceID`, `AllPipelineIDs` and `WithPipelines` instead. + +# One or more tracking issues or pull requests related to the change +issues: [11363] + +# (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: [api] diff --git a/component/componentstatus/instance.go b/component/componentstatus/instance.go index 1485ba15a4b..a654b7f7a87 100644 --- a/component/componentstatus/instance.go +++ b/component/componentstatus/instance.go @@ -36,13 +36,6 @@ func NewInstanceID(componentID component.ID, kind component.Kind, pipelineIDs .. return instanceID } -// NewInstanceIDWithPipelineIDs returns an InstanceID that uniquely identifies a component. -// -// Deprecated: [v0.111.0] Use NewInstanceIDWithPipelineID instead -func NewInstanceIDWithPipelineIDs(componentID component.ID, kind component.Kind, pipelineIDs ...pipeline.ID) *InstanceID { - return NewInstanceID(componentID, kind, pipelineIDs...) -} - // ComponentID returns the ComponentID associated with this instance. func (id *InstanceID) ComponentID() component.ID { return id.componentID @@ -74,14 +67,6 @@ func (id *InstanceID) AllPipelineIDs(f func(pipeline.ID) bool) { } } -// AllPipelineIDsWithPipelineIDs calls f for each pipeline this instance is associated with. If -// f returns false it will stop iteration. -// -// Deprecated: [v0.111.0] Use AllPipelineIDs instead. -func (id *InstanceID) AllPipelineIDsWithPipelineIDs(f func(pipeline.ID) bool) { - id.AllPipelineIDs(f) -} - // WithPipelines returns a new InstanceID updated to include the given // pipelineIDs. func (id *InstanceID) WithPipelines(pipelineIDs ...pipeline.ID) *InstanceID { @@ -94,14 +79,6 @@ func (id *InstanceID) WithPipelines(pipelineIDs ...pipeline.ID) *InstanceID { return instanceID } -// WithPipelineIDs returns a new InstanceID updated to include the given -// pipelineIDs. -// -// Deprecated: [v0.111.0] Use WithPipelines instead -func (id *InstanceID) WithPipelineIDs(pipelineIDs ...pipeline.ID) *InstanceID { - return id.WithPipelines(pipelineIDs...) -} - func (id *InstanceID) addPipelines(pipelineIDs []pipeline.ID) { delim := string(pipelineDelim) strIDs := strings.Split(id.pipelineIDs, delim) From 8001c936dd95d43656c104ef020f84dbdd7ea2cd Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 4 Oct 2024 12:23:00 -0600 Subject: [PATCH 13/14] [service] remove deprecated types (#11361) #### Description Removes deprecated types #### Link to tracking issue Related to https://github.com/open-telemetry/opentelemetry-collector/issues/9429 --- .../service-remove-deprecated-funcs.yaml | 25 +++++++++++++ otelcol/config.go | 37 ------------------- service/config.go | 19 +--------- service/pipelines/config.go | 28 -------------- service/service.go | 9 ----- 5 files changed, 27 insertions(+), 91 deletions(-) create mode 100644 .chloggen/service-remove-deprecated-funcs.yaml diff --git a/.chloggen/service-remove-deprecated-funcs.yaml b/.chloggen/service-remove-deprecated-funcs.yaml new file mode 100644 index 00000000000..97c0b7be817 --- /dev/null +++ b/.chloggen/service-remove-deprecated-funcs.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: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: service + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove deprecated `pipelines.ConfigWithPipelineID` and `Config.PipelinesWithPipelineID`. Use `pipelines.Config` and `Config.Pipelines` instead. + +# One or more tracking issues or pull requests related to the change +issues: [11361] + +# (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: [api] diff --git a/otelcol/config.go b/otelcol/config.go index b52d2c68bcb..33975957282 100644 --- a/otelcol/config.go +++ b/otelcol/config.go @@ -118,43 +118,6 @@ func (cfg *Config) Validate() error { } } - // Check that all pipelines reference only configured components. - // nolint - for pipelineID, pipeline := range cfg.Service.PipelinesWithPipelineID { - // Validate pipeline receiver name references. - for _, ref := range pipeline.Receivers { - // Check that the name referenced in the pipeline's receivers exists in the top-level receivers. - if _, ok := cfg.Receivers[ref]; ok { - continue - } - - if _, ok := cfg.Connectors[ref]; ok { - continue - } - return fmt.Errorf("service::pipelines::%s: references receiver %q which is not configured", pipelineID, ref) - } - - // Validate pipeline processor name references. - for _, ref := range pipeline.Processors { - // Check that the name referenced in the pipeline's processors exists in the top-level processors. - if cfg.Processors[ref] == nil { - return fmt.Errorf("service::pipelines::%s: references processor %q which is not configured", pipelineID, ref) - } - } - - // Validate pipeline exporter name references. - for _, ref := range pipeline.Exporters { - // Check that the name referenced in the pipeline's Exporters exists in the top-level Exporters. - if _, ok := cfg.Exporters[ref]; ok { - continue - } - if _, ok := cfg.Connectors[ref]; ok { - continue - } - return fmt.Errorf("service::pipelines::%s: references exporter %q which is not configured", pipelineID, ref) - } - } - // Check that all pipelines reference only configured components. for pipelineID, pipeline := range cfg.Service.Pipelines { // Validate pipeline receiver name references. diff --git a/service/config.go b/service/config.go index f7e52b83250..9c3eb4d7d74 100644 --- a/service/config.go +++ b/service/config.go @@ -21,26 +21,11 @@ type Config struct { // Pipelines are the set of data pipelines configured for the service. Pipelines pipelines.Config `mapstructure:"pipelines"` - - // Pipelines are the set of data pipelines configured for the service. - // - // Deprecated: [v0.111.0] Use Pipelines instead. - PipelinesWithPipelineID pipelines.ConfigWithPipelineID `mapstructure:"-"` // nolint } func (cfg *Config) Validate() error { - if len(cfg.Pipelines) > 0 && len(cfg.PipelinesWithPipelineID) > 0 { - return fmt.Errorf("service::pipelines config validation failed: cannot configure both Pipelines and PipelinesWithPipelineID") - } - - if len(cfg.PipelinesWithPipelineID) > 0 { - if err := cfg.PipelinesWithPipelineID.Validate(); err != nil { - return fmt.Errorf("service::pipelines config validation failed: %w", err) - } - } else { - if err := cfg.Pipelines.Validate(); err != nil { - return fmt.Errorf("service::pipelines config validation failed: %w", err) - } + if err := cfg.Pipelines.Validate(); err != nil { + return fmt.Errorf("service::pipelines config validation failed: %w", err) } if err := cfg.Telemetry.Validate(); err != nil { diff --git a/service/pipelines/config.go b/service/pipelines/config.go index d22e71fd67e..ff898aafacb 100644 --- a/service/pipelines/config.go +++ b/service/pipelines/config.go @@ -46,34 +46,6 @@ func (cfg Config) Validate() error { return nil } -// Deprecated: [v0.111.0] Use Config instead -type ConfigWithPipelineID map[pipeline.ID]*PipelineConfig - -func (cfg ConfigWithPipelineID) Validate() error { - // Must have at least one pipeline. - if len(cfg) == 0 { - return errMissingServicePipelines - } - - // Check that all pipelines have at least one receiver and one exporter, and they reference - // only configured components. - for pipelineID, p := range cfg { - switch pipelineID.Signal() { - case pipeline.SignalTraces, pipeline.SignalMetrics, pipeline.SignalLogs, componentprofiles.SignalProfiles: - // Continue - default: - return fmt.Errorf("pipeline %q: unknown signal %q", pipelineID.String(), pipelineID.Signal()) - } - - // Validate pipeline has at least one receiver. - if err := p.Validate(); err != nil { - return fmt.Errorf("pipeline %q: %w", pipelineID.String(), err) - } - } - - return nil -} - // PipelineConfig defines the configuration of a Pipeline. type PipelineConfig struct { Receivers []component.ID `mapstructure:"receivers"` diff --git a/service/service.go b/service/service.go index c08d8e68d24..0d7e8998114 100644 --- a/service/service.go +++ b/service/service.go @@ -33,7 +33,6 @@ import ( "go.opentelemetry.io/collector/service/internal/proctelemetry" "go.opentelemetry.io/collector/service/internal/resource" "go.opentelemetry.io/collector/service/internal/status" - "go.opentelemetry.io/collector/service/pipelines" "go.opentelemetry.io/collector/service/telemetry" ) @@ -305,14 +304,6 @@ func (srv *Service) initExtensions(ctx context.Context, cfg extensions.Config) e // Creates the pipeline graph. func (srv *Service) initGraph(ctx context.Context, cfg Config) error { - // nolint - if len(cfg.PipelinesWithPipelineID) > 0 { - cfg.Pipelines = make(pipelines.Config, len(cfg.PipelinesWithPipelineID)) - for k, v := range cfg.PipelinesWithPipelineID { - cfg.Pipelines[k] = v - } - } - var err error if srv.host.Pipelines, err = graph.Build(ctx, graph.Settings{ Telemetry: srv.telemetrySettings, From c3f09f4e9a2521a861ae2708f30b5425e535428e Mon Sep 17 00:00:00 2001 From: Daniel Jaglowski Date: Fri, 4 Oct 2024 17:35:22 -0400 Subject: [PATCH 14/14] [processorhelper] Fix bug where record in/out metrics were skipped (#11360) Resolves #11351 --- .chloggen/processorhelper-in-out-fix.yaml | 25 ++++++++++ processor/processorhelper/logs.go | 1 + processor/processorhelper/logs_test.go | 56 ++++++++++++++++++++++ processor/processorhelper/metrics.go | 1 + processor/processorhelper/metrics_test.go | 55 ++++++++++++++++++++++ processor/processorhelper/traces.go | 1 + processor/processorhelper/traces_test.go | 57 +++++++++++++++++++++++ 7 files changed, 196 insertions(+) create mode 100644 .chloggen/processorhelper-in-out-fix.yaml diff --git a/.chloggen/processorhelper-in-out-fix.yaml b/.chloggen/processorhelper-in-out-fix.yaml new file mode 100644 index 00000000000..5bff90ef80b --- /dev/null +++ b/.chloggen/processorhelper-in-out-fix.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: 'bug_fix' + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: processorhelper + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix issue where in/out parameters were not recorded when error was returned from consumer. + +# One or more tracking issues or pull requests related to the change +issues: [11351] + +# (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/processor/processorhelper/logs.go b/processor/processorhelper/logs.go index a434fe8fb93..5fedd5dfaf0 100644 --- a/processor/processorhelper/logs.go +++ b/processor/processorhelper/logs.go @@ -55,6 +55,7 @@ func NewLogs( ld, errFunc = logsFunc(ctx, ld) span.AddEvent("End processing.", eventOptions) if errFunc != nil { + obs.recordInOut(ctx, recordsIn, 0) if errors.Is(errFunc, ErrSkipProcessingData) { return nil } diff --git a/processor/processorhelper/logs_test.go b/processor/processorhelper/logs_test.go index 0e94feb2f29..9a6c5592745 100644 --- a/processor/processorhelper/logs_test.go +++ b/processor/processorhelper/logs_test.go @@ -159,3 +159,59 @@ func TestLogs_RecordInOut(t *testing.T) { }, }) } + +func TestLogs_RecordIn_ErrorOut(t *testing.T) { + // Regardless of input, return error + mockErr := func(_ context.Context, _ plog.Logs) (plog.Logs, error) { + return plog.NewLogs(), errors.New("fake") + } + + incomingLogs := plog.NewLogs() + incomingLogRecords := incomingLogs.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords() + + // Add 3 records to the incoming + incomingLogRecords.AppendEmpty() + incomingLogRecords.AppendEmpty() + incomingLogRecords.AppendEmpty() + + testTelemetry := setupTestTelemetry() + lp, err := NewLogs(context.Background(), testTelemetry.NewSettings(), &testLogsCfg, consumertest.NewNop(), mockErr) + require.NoError(t, err) + + require.NoError(t, lp.Start(context.Background(), componenttest.NewNopHost())) + require.Error(t, lp.ConsumeLogs(context.Background(), incomingLogs)) + require.NoError(t, lp.Shutdown(context.Background())) + + testTelemetry.assertMetrics(t, []metricdata.Metrics{ + { + Name: "otelcol_processor_incoming_items", + Description: "Number of items passed to the processor. [alpha]", + Unit: "{items}", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 3, + Attributes: attribute.NewSet(attribute.String("processor", "processorhelper"), attribute.String("otel.signal", "logs")), + }, + }, + }, + }, + { + Name: "otelcol_processor_outgoing_items", + Description: "Number of items emitted from the processor. [alpha]", + Unit: "{items}", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 0, + Attributes: attribute.NewSet(attribute.String("processor", "processorhelper"), attribute.String("otel.signal", "logs")), + }, + }, + }, + }, + }) +} diff --git a/processor/processorhelper/metrics.go b/processor/processorhelper/metrics.go index c8381fd9589..bf69e1b1693 100644 --- a/processor/processorhelper/metrics.go +++ b/processor/processorhelper/metrics.go @@ -55,6 +55,7 @@ func NewMetrics( md, errFunc = metricsFunc(ctx, md) span.AddEvent("End processing.", eventOptions) if errFunc != nil { + obs.recordInOut(ctx, pointsIn, 0) if errors.Is(errFunc, ErrSkipProcessingData) { return nil } diff --git a/processor/processorhelper/metrics_test.go b/processor/processorhelper/metrics_test.go index 0bea27c2c22..cb841abfa74 100644 --- a/processor/processorhelper/metrics_test.go +++ b/processor/processorhelper/metrics_test.go @@ -159,3 +159,58 @@ func TestMetrics_RecordInOut(t *testing.T) { }, }) } + +func TestMetrics_RecordIn_ErrorOut(t *testing.T) { + /// Regardless of input, return error + mockErr := func(_ context.Context, _ pmetric.Metrics) (pmetric.Metrics, error) { + return pmetric.NewMetrics(), errors.New("fake") + } + + incomingMetrics := pmetric.NewMetrics() + dps := incomingMetrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptySum().DataPoints() + + // Add 2 data points to the incoming + dps.AppendEmpty() + dps.AppendEmpty() + + testTelemetry := setupTestTelemetry() + mp, err := NewMetrics(context.Background(), testTelemetry.NewSettings(), &testMetricsCfg, consumertest.NewNop(), mockErr) + require.NoError(t, err) + + require.NoError(t, mp.Start(context.Background(), componenttest.NewNopHost())) + require.Error(t, mp.ConsumeMetrics(context.Background(), incomingMetrics)) + require.NoError(t, mp.Shutdown(context.Background())) + + testTelemetry.assertMetrics(t, []metricdata.Metrics{ + { + Name: "otelcol_processor_incoming_items", + Description: "Number of items passed to the processor. [alpha]", + Unit: "{items}", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 2, + Attributes: attribute.NewSet(attribute.String("processor", "processorhelper"), attribute.String("otel.signal", "metrics")), + }, + }, + }, + }, + { + Name: "otelcol_processor_outgoing_items", + Description: "Number of items emitted from the processor. [alpha]", + Unit: "{items}", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 0, + Attributes: attribute.NewSet(attribute.String("processor", "processorhelper"), attribute.String("otel.signal", "metrics")), + }, + }, + }, + }, + }) +} diff --git a/processor/processorhelper/traces.go b/processor/processorhelper/traces.go index 492634541cc..3cebc3ab9b9 100644 --- a/processor/processorhelper/traces.go +++ b/processor/processorhelper/traces.go @@ -55,6 +55,7 @@ func NewTraces( td, errFunc = tracesFunc(ctx, td) span.AddEvent("End processing.", eventOptions) if errFunc != nil { + obs.recordInOut(ctx, spansIn, 0) if errors.Is(errFunc, ErrSkipProcessingData) { return nil } diff --git a/processor/processorhelper/traces_test.go b/processor/processorhelper/traces_test.go index ecc4f3c9184..a55e99aa42b 100644 --- a/processor/processorhelper/traces_test.go +++ b/processor/processorhelper/traces_test.go @@ -161,3 +161,60 @@ func TestTraces_RecordInOut(t *testing.T) { }, }) } + +func TestTraces_RecordIn_ErrorOut(t *testing.T) { + // Regardless of input, return error + mockErr := func(_ context.Context, _ ptrace.Traces) (ptrace.Traces, error) { + return ptrace.NewTraces(), errors.New("fake") + } + + incomingTraces := ptrace.NewTraces() + incomingSpans := incomingTraces.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans() + + // Add 4 records to the incoming + incomingSpans.AppendEmpty() + incomingSpans.AppendEmpty() + incomingSpans.AppendEmpty() + incomingSpans.AppendEmpty() + + testTelemetry := setupTestTelemetry() + tp, err := NewTraces(context.Background(), testTelemetry.NewSettings(), &testLogsCfg, consumertest.NewNop(), mockErr) + require.NoError(t, err) + + require.NoError(t, tp.Start(context.Background(), componenttest.NewNopHost())) + require.Error(t, tp.ConsumeTraces(context.Background(), incomingTraces)) + require.NoError(t, tp.Shutdown(context.Background())) + + testTelemetry.assertMetrics(t, []metricdata.Metrics{ + { + Name: "otelcol_processor_incoming_items", + Description: "Number of items passed to the processor. [alpha]", + Unit: "{items}", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 4, + Attributes: attribute.NewSet(attribute.String("processor", "processorhelper"), attribute.String("otel.signal", "traces")), + }, + }, + }, + }, + { + Name: "otelcol_processor_outgoing_items", + Description: "Number of items emitted from the processor. [alpha]", + Unit: "{items}", + Data: metricdata.Sum[int64]{ + Temporality: metricdata.CumulativeTemporality, + IsMonotonic: true, + DataPoints: []metricdata.DataPoint[int64]{ + { + Value: 0, + Attributes: attribute.NewSet(attribute.String("processor", "processorhelper"), attribute.String("otel.signal", "traces")), + }, + }, + }, + }, + }) +}