diff --git a/.chloggen/remove-ballast-extension.yaml b/.chloggen/remove-ballast-extension.yaml new file mode 100644 index 00000000000..bf1a2f14f93 --- /dev/null +++ b/.chloggen/remove-ballast-extension.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: ballastextension + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Removes the deprecated ballastextension + +# One or more tracking issues or pull requests related to the change +issues: [10671] + +# (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 b05559316c2..f55fc160db3 100644 --- a/Makefile +++ b/Makefile @@ -293,7 +293,6 @@ check-contrib: -replace go.opentelemetry.io/collector/extension=$(CURDIR)/extension \ -replace go.opentelemetry.io/collector/extension/auth=$(CURDIR)/extension/auth \ -replace go.opentelemetry.io/collector/extension/experimental/storage=$(CURDIR)/extension/experimental/storage \ - -replace go.opentelemetry.io/collector/extension/ballastextension=$(CURDIR)/extension/ballastextension \ -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 \ @@ -358,7 +357,6 @@ restore-contrib: -dropreplace go.opentelemetry.io/collector/exporter/otlphttpexporter \ -dropreplace go.opentelemetry.io/collector/extension \ -dropreplace go.opentelemetry.io/collector/extension/auth \ - -dropreplace go.opentelemetry.io/collector/extension/ballastextension \ -dropreplace go.opentelemetry.io/collector/extension/memorylimiterextension \ -dropreplace go.opentelemetry.io/collector/extension/zpagesextension \ -dropreplace go.opentelemetry.io/collector/featuregate \ diff --git a/cmd/builder/internal/config/default.yaml b/cmd/builder/internal/config/default.yaml index 4d28b5b3b63..84e45e77134 100644 --- a/cmd/builder/internal/config/default.yaml +++ b/cmd/builder/internal/config/default.yaml @@ -23,7 +23,6 @@ exporters: - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.108.1 - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.108.1 extensions: - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.108.1 - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.108.1 - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.108.1 processors: diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index 1db20c35c62..9c919cc2afe 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -23,7 +23,6 @@ exporters: - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.108.1 - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.108.1 extensions: - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.108.1 - gomod: go.opentelemetry.io/collector/extension/memorylimiterextension v0.108.1 - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.108.1 processors: @@ -79,7 +78,6 @@ replaces: - go.opentelemetry.io/collector/extension => ../../extension - go.opentelemetry.io/collector/extension/auth => ../../extension/auth - go.opentelemetry.io/collector/extension/experimental/storage => ../../extension/experimental/storage - - go.opentelemetry.io/collector/extension/ballastextension => ../../extension/ballastextension - go.opentelemetry.io/collector/extension/memorylimiterextension => ../../extension/memorylimiterextension - go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - go.opentelemetry.io/collector/featuregate => ../../featuregate diff --git a/cmd/otelcorecol/components.go b/cmd/otelcorecol/components.go index 94115c0ebe6..2ad9555478c 100644 --- a/cmd/otelcorecol/components.go +++ b/cmd/otelcorecol/components.go @@ -13,7 +13,6 @@ import ( otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter" otlphttpexporter "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension" - ballastextension "go.opentelemetry.io/collector/extension/ballastextension" memorylimiterextension "go.opentelemetry.io/collector/extension/memorylimiterextension" zpagesextension "go.opentelemetry.io/collector/extension/zpagesextension" "go.opentelemetry.io/collector/otelcol" @@ -30,7 +29,6 @@ func components() (otelcol.Factories, error) { factories := otelcol.Factories{} factories.Extensions, err = extension.MakeFactoryMap( - ballastextension.NewFactory(), memorylimiterextension.NewFactory(), zpagesextension.NewFactory(), ) @@ -38,7 +36,6 @@ func components() (otelcol.Factories, error) { return otelcol.Factories{}, err } factories.ExtensionModules = make(map[component.Type]string, len(factories.Extensions)) - factories.ExtensionModules[ballastextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/ballastextension v0.108.1" factories.ExtensionModules[memorylimiterextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/memorylimiterextension v0.108.1" factories.ExtensionModules[zpagesextension.NewFactory().Type()] = "go.opentelemetry.io/collector/extension/zpagesextension v0.108.1" diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index 828894a7a93..8ee213b30fa 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -23,7 +23,6 @@ require ( go.opentelemetry.io/collector/exporter/otlpexporter v0.108.1 go.opentelemetry.io/collector/exporter/otlphttpexporter v0.108.1 go.opentelemetry.io/collector/extension v0.108.1 - go.opentelemetry.io/collector/extension/ballastextension v0.108.1 go.opentelemetry.io/collector/extension/memorylimiterextension v0.108.1 go.opentelemetry.io/collector/extension/zpagesextension v0.108.1 go.opentelemetry.io/collector/otelcol v0.108.1 @@ -224,8 +223,6 @@ replace go.opentelemetry.io/collector/extension/auth => ../../extension/auth replace go.opentelemetry.io/collector/extension/experimental/storage => ../../extension/experimental/storage -replace go.opentelemetry.io/collector/extension/ballastextension => ../../extension/ballastextension - replace go.opentelemetry.io/collector/extension/memorylimiterextension => ../../extension/memorylimiterextension replace go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension diff --git a/component/config_test.go b/component/config_test.go index f47a9edc87c..afdbc61b06e 100644 --- a/component/config_test.go +++ b/component/config_test.go @@ -313,7 +313,6 @@ func TestNewType(t *testing.T) { {name: "loki"}, {name: "mdatagen"}, {name: "memcached"}, - {name: "memory_ballast"}, {name: "memory_limiter"}, {name: "metricstransform"}, {name: "mezmo"}, diff --git a/extension/ballastextension/Makefile b/extension/ballastextension/Makefile deleted file mode 100644 index ded7a36092d..00000000000 --- a/extension/ballastextension/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../Makefile.Common diff --git a/extension/ballastextension/README.md b/extension/ballastextension/README.md deleted file mode 100644 index 3115ca39de8..00000000000 --- a/extension/ballastextension/README.md +++ /dev/null @@ -1,63 +0,0 @@ -> [!WARNING] -> The memory ballast extension is deprecated in favor of using the `GOMEMLIMIT` environment variable. -> This environment variable is available on any Collector built with Go 1.19 or higher. Official binary releases are built with Go 1.19 since v0.61.0. See [issue 8343](https://github.com/open-telemetry/opentelemetry-collector/issues/8343) for the deprecation timeline. -> -> To migrate to `GOMEMLIMIT`, set its value to 80% of the hard memory limit of your Collector. -> For example, if the Collector hard memory limit is 1GiB, set `GOMEMLIMIT` to `800MiB`. -> Check [the Go documentation](https://pkg.go.dev/runtime#hdr-Environment_Variables) for more information about `GOMEMLIMIT`'s syntax. - -# Memory Ballast - - -| Status | | -| ------------- |-----------| -| Stability | [deprecated] | -| Distributions | [core], [contrib] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fballast%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fballast) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fballast%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fballast) | - -[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 - - -Memory Ballast extension enables applications to configure memory ballast for the process. For more details see: -- [Go memory ballast blogpost](https://web.archive.org/web/20210929130001/https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i-learnt-to-stop-worrying-and-love-the-heap-26c2462549a2/) -- [Golang issue related to this](https://github.com/golang/go/issues/23044) - -The following settings can be configured: - -- `size_mib` (default = 0, disabled): Is the memory ballast size, in MiB. - Takes higher priority than `size_in_percentage` if both are specified at the same time. -- `size_in_percentage` (default = 0, disabled): Set the memory ballast based on the - total memory in percentage, value range is `1-100`. - It is supported in both containerized(eg, docker, k8s) and physical host environments. - -**How ballast size is calculated with percentage configuration** -When `size_in_percentage` is enabled with the value(1-100), the absolute `ballast_size` will be calculated by -`size_in_percentage * totalMemory / 100`. The `totalMemory` can be retrieved for hosts and containers(in docker, k8s, etc) by the following steps, -1. Look up Memory Cgroup subsystem on the target host or container, find out if there is any total memory limitation has been set for the running collector process. - Check the value in `memory.limit_in_bytes` file under cgroup memory files (eg, `/sys/fs/cgroup/memory/memory.limit_in_bytes`). - -2. If `memory.limit_in_bytes` is positive value other than `9223372036854771712`(`0x7FFFFFFFFFFFF000`). The `ballast_size` - will be calculated by `memory.limit_in_bytes * size_in_percentage / 100`. - If `memory.limit_in_bytes` value is `9223372036854771712`(`0x7FFFFFFFFFFFF000`), it indicates there is no memory limit has - been set for the collector process or the running container in cgroup. Then the `totalMemory` will be determined in next step. - -3. if there is no memory limit set in cgroup for the collector process or container where the collector is running. The total memory will be - calculated by `github.com/shirou/gopsutil/v3/mem`[[link]](https://github.com/shirou/gopsutil/) on `mem.VirtualMemory().total` which is supported in multiple OS systems. - - -Example: -Config that uses 64 Mib of memory for the ballast: -```yaml -extensions: - memory_ballast: - size_mib: 64 -``` - -Config that uses 20% of the total memory for the ballast: -```yaml -extensions: - memory_ballast: - size_in_percentage: 20 -``` diff --git a/extension/ballastextension/config.go b/extension/ballastextension/config.go deleted file mode 100644 index 6eb166b3dae..00000000000 --- a/extension/ballastextension/config.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ballastextension // import "go.opentelemetry.io/collector/extension/ballastextension" - -import ( - "errors" -) - -// Config has the configuration for the ballast extension. -type Config struct { - // SizeMiB is the size, in MiB, of the memory ballast - // to be created for this process. - SizeMiB uint64 `mapstructure:"size_mib"` - - // SizeInPercentage is the maximum amount of memory ballast, in %, targeted to be - // allocated. The fixed memory settings SizeMiB has a higher precedence. - SizeInPercentage uint64 `mapstructure:"size_in_percentage"` -} - -// Validate checks if the extension configuration is valid -func (cfg *Config) Validate() error { - // no need to validate less than 0 case for uint64 - if cfg.SizeInPercentage > 100 { - return errors.New("size_in_percentage is not in range 0 to 100") - } - return nil -} diff --git a/extension/ballastextension/config_test.go b/extension/ballastextension/config_test.go deleted file mode 100644 index 25e3223fe45..00000000000 --- a/extension/ballastextension/config_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ballastextension - -import ( - "path/filepath" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/confmap" - "go.opentelemetry.io/collector/confmap/confmaptest" -) - -func TestUnmarshalDefaultConfig(t *testing.T) { - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - assert.NoError(t, confmap.New().Unmarshal(&cfg)) - assert.Equal(t, factory.CreateDefaultConfig(), cfg) -} - -func TestUnmarshalConfig(t *testing.T) { - cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) - require.NoError(t, err) - factory := NewFactory() - cfg := factory.CreateDefaultConfig() - assert.NoError(t, cm.Unmarshal(&cfg)) - assert.Equal(t, - &Config{ - SizeMiB: 123, - SizeInPercentage: 20, - }, cfg) -} - -func TestConfigValidate(t *testing.T) { - cfg := &Config{SizeInPercentage: 200} - err := cfg.Validate() - require.Error(t, err) - assert.Equal(t, "size_in_percentage is not in range 0 to 100", err.Error()) -} diff --git a/extension/ballastextension/factory.go b/extension/ballastextension/factory.go deleted file mode 100644 index 36d6004c902..00000000000 --- a/extension/ballastextension/factory.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate mdatagen metadata.yaml - -package ballastextension // import "go.opentelemetry.io/collector/extension/ballastextension" - -import ( - "context" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/extension" - "go.opentelemetry.io/collector/extension/ballastextension/internal/metadata" - "go.opentelemetry.io/collector/internal/iruntime" -) - -// memHandler returns the total memory of the target host/vm -var memHandler = iruntime.TotalMemory - -// NewFactory creates a factory for ballast extension. -func NewFactory() extension.Factory { - return extension.NewFactory(metadata.Type, createDefaultConfig, createExtension, metadata.ExtensionStability) -} - -func createDefaultConfig() component.Config { - return &Config{} -} - -func createExtension(_ context.Context, set extension.Settings, cfg component.Config) (extension.Extension, error) { - return newMemoryBallast(cfg.(*Config), set.TelemetrySettings.Logger, memHandler), nil -} diff --git a/extension/ballastextension/factory_test.go b/extension/ballastextension/factory_test.go deleted file mode 100644 index 0c9e91f8224..00000000000 --- a/extension/ballastextension/factory_test.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ballastextension - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/extension/extensiontest" -) - -func TestFactory_CreateDefaultConfig(t *testing.T) { - cfg := createDefaultConfig() - assert.Equal(t, &Config{}, cfg) - - assert.NoError(t, componenttest.CheckConfigStruct(cfg)) - ext, err := createExtension(context.Background(), extensiontest.NewNopSettings(), cfg) - require.NoError(t, err) - require.NotNil(t, ext) -} - -func TestFactory_CreateExtension(t *testing.T) { - cfg := createDefaultConfig().(*Config) - ext, err := createExtension(context.Background(), extensiontest.NewNopSettings(), cfg) - require.NoError(t, err) - require.NotNil(t, ext) -} diff --git a/extension/ballastextension/generated_component_test.go b/extension/ballastextension/generated_component_test.go deleted file mode 100644 index d70b7d0498d..00000000000 --- a/extension/ballastextension/generated_component_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package ballastextension - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/confmap/confmaptest" - "go.opentelemetry.io/collector/extension/extensiontest" -) - -func TestComponentFactoryType(t *testing.T) { - require.Equal(t, "memory_ballast", NewFactory().Type().String()) -} - -func TestComponentConfigStruct(t *testing.T) { - require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) -} - -func TestComponentLifecycle(t *testing.T) { - factory := NewFactory() - - 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)) - t.Run("shutdown", func(t *testing.T) { - e, err := factory.CreateExtension(context.Background(), extensiontest.NewNopSettings(), cfg) - require.NoError(t, err) - err = e.Shutdown(context.Background()) - require.NoError(t, err) - }) - t.Run("lifecycle", func(t *testing.T) { - firstExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopSettings(), cfg) - require.NoError(t, err) - require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) - require.NoError(t, firstExt.Shutdown(context.Background())) - - secondExt, err := factory.CreateExtension(context.Background(), extensiontest.NewNopSettings(), cfg) - require.NoError(t, err) - require.NoError(t, secondExt.Start(context.Background(), componenttest.NewNopHost())) - require.NoError(t, secondExt.Shutdown(context.Background())) - }) -} diff --git a/extension/ballastextension/generated_package_test.go b/extension/ballastextension/generated_package_test.go deleted file mode 100644 index 3f80a3e2754..00000000000 --- a/extension/ballastextension/generated_package_test.go +++ /dev/null @@ -1,13 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package ballastextension - -import ( - "testing" - - "go.uber.org/goleak" -) - -func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) -} diff --git a/extension/ballastextension/go.mod b/extension/ballastextension/go.mod deleted file mode 100644 index bdf1fdfc1f3..00000000000 --- a/extension/ballastextension/go.mod +++ /dev/null @@ -1,92 +0,0 @@ -// Deprecated: Use the GOMEMLIMIT environment variable instead. -module go.opentelemetry.io/collector/extension/ballastextension - -go 1.22.0 - -require ( - github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.108.1 - go.opentelemetry.io/collector/component v0.108.1 - go.opentelemetry.io/collector/confmap v1.14.1 - go.opentelemetry.io/collector/extension v0.108.1 - go.uber.org/goleak v1.3.0 - go.uber.org/zap v1.27.0 -) - -require ( - github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.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-ole/go-ole v1.2.6 // 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/klauspost/compress v1.17.9 // 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/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.20.2 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.57.0 // indirect - github.com/prometheus/procfs v0.15.1 // indirect - github.com/shirou/gopsutil/v4 v4.24.7 // indirect - 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.108.1 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.108.1 // indirect - go.opentelemetry.io/collector/pdata v1.14.1 // indirect - go.opentelemetry.io/otel v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.51.0 // indirect - go.opentelemetry.io/otel/metric v1.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.29.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect - go.opentelemetry.io/otel/trace v1.29.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 - 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.66.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -replace go.opentelemetry.io/collector => ../../ - -replace go.opentelemetry.io/collector/component => ../../component - -replace go.opentelemetry.io/collector/confmap => ../../confmap - -replace go.opentelemetry.io/collector/extension => ../ - -replace go.opentelemetry.io/collector/featuregate => ../../featuregate - -replace go.opentelemetry.io/collector/pdata => ../../pdata - -replace go.opentelemetry.io/collector/consumer => ../../consumer - -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/pdata/testdata => ../../pdata/testdata - -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/component/componentstatus => ../../component/componentstatus diff --git a/extension/ballastextension/go.sum b/extension/ballastextension/go.sum deleted file mode 100644 index 17f3aaae836..00000000000 --- a/extension/ballastextension/go.sum +++ /dev/null @@ -1,136 +0,0 @@ -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -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.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -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/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= -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/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg= -github.com/prometheus/client_golang v1.20.2/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.57.0 h1:Ro/rKjwdq9mZn1K5QPctzh+MA4Lp0BuYk5ZZEVhoNcY= -github.com/prometheus/common v0.57.0/go.mod h1:7uRPFSUTbfZWsJ7MHY56sqt7hLQu3bxXHDnNhl8E9qI= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -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/shirou/gopsutil/v4 v4.24.7 h1:V9UGTK4gQ8HvcnPKf6Zt3XHyQq/peaekfxpJ2HSocJk= -github.com/shirou/gopsutil/v4 v4.24.7/go.mod h1:0uW/073rP7FYLOkvxolUQM5rMOLTNmRXnFKafpb71rw= -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/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= -github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel/exporters/prometheus v0.51.0 h1:G7uexXb/K3T+T9fNLCCKncweEtNEBMTO+46hKX5EdKw= -go.opentelemetry.io/otel/exporters/prometheus v0.51.0/go.mod h1:v0mFe5Kk7woIh938mrZBJBmENYquyA0IICrlYm4Y0t4= -go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= -go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= -go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= -go.opentelemetry.io/otel/sdk/metric v1.29.0 h1:K2CfmJohnRgvZ9UAj2/FhIf/okdWcNdBwe1m8xFXiSY= -go.opentelemetry.io/otel/sdk/metric v1.29.0/go.mod h1:6zZLdCl2fkauYoZIOn/soQIDSWFmNSRcICarHfuhNJQ= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= -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-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.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.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= -google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= -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/extension/ballastextension/internal/metadata/generated_status.go b/extension/ballastextension/internal/metadata/generated_status.go deleted file mode 100644 index 2acd5fd7570..00000000000 --- a/extension/ballastextension/internal/metadata/generated_status.go +++ /dev/null @@ -1,16 +0,0 @@ -// Code generated by mdatagen. DO NOT EDIT. - -package metadata - -import ( - "go.opentelemetry.io/collector/component" -) - -var ( - Type = component.MustNewType("memory_ballast") - ScopeName = "go.opentelemetry.io/collector/extension/ballastextension" -) - -const ( - ExtensionStability = component.StabilityLevelDeprecated -) diff --git a/extension/ballastextension/memory_ballast.go b/extension/ballastextension/memory_ballast.go deleted file mode 100644 index afbf6ec6d7d..00000000000 --- a/extension/ballastextension/memory_ballast.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ballastextension // import "go.opentelemetry.io/collector/extension/ballastextension" - -import ( - "context" - - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component" -) - -const megaBytes = 1024 * 1024 - -type memoryBallast struct { - cfg *Config - logger *zap.Logger - ballast []byte - ballastSizeBytes uint64 - getTotalMem func() (uint64, error) -} - -func (m *memoryBallast) Start(context.Context, component.Host) error { - // absolute value supersedes percentage setting - if m.cfg.SizeMiB > 0 { - m.ballastSizeBytes = m.cfg.SizeMiB * megaBytes - } else { - totalMemory, err := m.getTotalMem() - if err != nil { - return err - } - ballastPercentage := m.cfg.SizeInPercentage - m.ballastSizeBytes = ballastPercentage * totalMemory / 100 - } - - if m.ballastSizeBytes > 0 { - m.ballast = make([]byte, m.ballastSizeBytes) - } - - m.logger.Info("Setting memory ballast", zap.Uint32("MiBs", uint32(m.ballastSizeBytes/megaBytes))) - - return nil -} - -func (m *memoryBallast) Shutdown(context.Context) error { - m.ballast = nil - return nil -} - -func newMemoryBallast(cfg *Config, logger *zap.Logger, getTotalMem func() (uint64, error)) *memoryBallast { - return &memoryBallast{ - cfg: cfg, - logger: logger, - getTotalMem: getTotalMem, - } -} - -// GetBallastSize returns the current ballast memory setting in bytes -func (m *memoryBallast) GetBallastSize() uint64 { - return m.ballastSizeBytes -} diff --git a/extension/ballastextension/memory_ballast_test.go b/extension/ballastextension/memory_ballast_test.go deleted file mode 100644 index b7f39114caa..00000000000 --- a/extension/ballastextension/memory_ballast_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ballastextension - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/internal/iruntime" -) - -func TestMemoryBallast(t *testing.T) { - tests := []struct { - name string - config *Config - getTotalMem func() (uint64, error) - expect int - }{ - { - name: "test_abs_ballast", - config: &Config{ - SizeMiB: 13, - }, - getTotalMem: iruntime.TotalMemory, - expect: 13 * megaBytes, - }, - { - name: "test_abs_ballast_priority", - config: &Config{ - SizeMiB: 13, - SizeInPercentage: 20, - }, - getTotalMem: iruntime.TotalMemory, - expect: 13 * megaBytes, - }, - { - name: "test_ballast_zero_val", - config: &Config{}, - getTotalMem: iruntime.TotalMemory, - expect: 0, - }, - { - name: "test_ballast_in_percentage", - config: &Config{ - SizeInPercentage: 20, - }, - getTotalMem: mockTotalMem, - expect: 20 * megaBytes, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - mbExt := newMemoryBallast(tt.config, zap.NewNop(), tt.getTotalMem) - require.NotNil(t, mbExt) - assert.Nil(t, mbExt.ballast) - - assert.NoError(t, mbExt.Start(context.Background(), componenttest.NewNopHost())) - assert.Equal(t, tt.expect, len(mbExt.ballast)) - - assert.NoError(t, mbExt.Shutdown(context.Background())) - assert.Nil(t, mbExt.ballast) - }) - } -} - -func mockTotalMem() (uint64, error) { - return uint64(100 * megaBytes), nil -} diff --git a/extension/ballastextension/metadata.yaml b/extension/ballastextension/metadata.yaml deleted file mode 100644 index 548d4a4ed75..00000000000 --- a/extension/ballastextension/metadata.yaml +++ /dev/null @@ -1,8 +0,0 @@ -type: memory_ballast -github_project: open-telemetry/opentelemetry-collector - -status: - class: extension - stability: - deprecated: [extension] - distributions: [core, contrib] diff --git a/extension/ballastextension/testdata/config.yaml b/extension/ballastextension/testdata/config.yaml deleted file mode 100644 index 7d58cd6bcc4..00000000000 --- a/extension/ballastextension/testdata/config.yaml +++ /dev/null @@ -1,2 +0,0 @@ -size_mib: 123 -size_in_percentage: 20 diff --git a/extension/memorylimiterextension/README.md b/extension/memorylimiterextension/README.md index ab45eb8e840..65dbc5eb85e 100644 --- a/extension/memorylimiterextension/README.md +++ b/extension/memorylimiterextension/README.md @@ -1,8 +1,5 @@ # Memory Limiter Extension -> [!WARNING] -> The memory_limiter extension cannot be used if the deprecated memory_ballast extension is enabled. - | Status | | | ------------- |-----------| diff --git a/service/service.go b/service/service.go index 063b7f45ab9..4f83a40bfec 100644 --- a/service/service.go +++ b/service/service.go @@ -175,7 +175,6 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { } if cfg.Telemetry.Metrics.Level != configtelemetry.LevelNone && cfg.Telemetry.Metrics.Address != "" { - // The process telemetry initialization requires the ballast size, which is available after the extensions are initialized. if err = proctelemetry.RegisterProcessMetrics(srv.telemetrySettings); err != nil { return nil, fmt.Errorf("failed to register process metrics: %w", err) } diff --git a/versions.yaml b/versions.yaml index 1b3f412f173..46b524c526c 100644 --- a/versions.yaml +++ b/versions.yaml @@ -51,7 +51,6 @@ module-sets: - go.opentelemetry.io/collector/extension - go.opentelemetry.io/collector/extension/auth - go.opentelemetry.io/collector/extension/experimental/storage - - go.opentelemetry.io/collector/extension/ballastextension - go.opentelemetry.io/collector/extension/zpagesextension - go.opentelemetry.io/collector/extension/memorylimiterextension - go.opentelemetry.io/collector/otelcol