diff --git a/cmd/otelcol/config.yaml b/cmd/otelcol/config.yaml index 81d0566e917..967dcebb40a 100644 --- a/cmd/otelcol/config.yaml +++ b/cmd/otelcol/config.yaml @@ -1,6 +1,6 @@ extensions: - pprof: - endpoint: 0.0.0.0:1777 + memory_ballast: + size_mib: 512 zpages: endpoint: 0.0.0.0:55679 @@ -31,4 +31,4 @@ service: processors: [batch] exporters: [logging] - extensions: [pprof, zpages] + extensions: [memory_ballast, zpages] diff --git a/examples/local/otel-config.yaml b/examples/local/otel-config.yaml index 2265af02a7e..35bba1ba5c6 100644 --- a/examples/local/otel-config.yaml +++ b/examples/local/otel-config.yaml @@ -1,6 +1,6 @@ extensions: - pprof: - endpoint: 0.0.0.0:1777 + memory_ballast: + size_mib: 512 zpages: endpoint: 0.0.0.0:55679 @@ -34,4 +34,4 @@ service: processors: [memory_limiter, batch] exporters: [logging] - extensions: [pprof, zpages] + extensions: [memory_ballast, zpages] diff --git a/extension/README.md b/extension/README.md index de13f76b9ad..4f9661e1414 100644 --- a/extension/README.md +++ b/extension/README.md @@ -10,8 +10,7 @@ performance profile. Supported service extensions (sorted alphabetically): -- [Health Check](healthcheckextension/README.md) -- [Performance Profiler](pprofextension/README.md) +- [Memory Ballast](ballastextension/README.md) - [zPages](zpagesextension/README.md) The [contributors @@ -29,79 +28,5 @@ will be shutdown. The ordering is determined in the `extensions` tag under the service: # Extensions specified below are going to be loaded by the service in the # order given below, and shutdown on reverse order. - extensions: [health_check, pprof, zpages] + extensions: [memory_ballast, zpages] ``` - -# Extensions - -## Health Check -Health Check extension enables an HTTP url that can be probed to check the -status of the OpenTelemetry Collector. This extension can be used as a -liveness and/or readiness probe on Kubernetes. - -The following settings are required: - -- `port` (default = 13133): What port to expose HTTP health information. - -Example: - -```yaml -extensions: - health_check: -``` - -The full list of settings exposed for this exporter is documented [here](healthcheckextension/config.go) -with detailed sample configurations [here](healthcheckextension/testdata/config.yaml). - -## Performance Profiler - -Performance Profiler extension enables the golang `net/http/pprof` endpoint. -This is typically used by developers to collect performance profiles and -investigate issues with the service. - -The following settings are required: - -- `endpoint` (default = localhost:1777): The endpoint in which the pprof will -be listening to. -- `block_profile_fraction` (default = 0): Fraction of blocking events that -are profiled. A value <= 0 disables profiling. See -https://golang.org/pkg/runtime/#SetBlockProfileRate for details. -- `mutex_profile_fraction` (default = 0): Fraction of mutex contention -events that are profiled. A value <= 0 disables profiling. See -https://golang.org/pkg/runtime/#SetMutexProfileFraction for details. - -The following settings can be optionally configured: - -- `save_to_file`: File name to save the CPU profile to. The profiling starts when the -Collector starts and is saved to the file when the Collector is terminated. - -Example: - -```yaml -extensions: - pprof: -``` - -The full list of settings exposed for this exporter are documented [here](pprofextension/config.go) -with detailed sample configurations [here](pprofextension/testdata/config.yaml). - -## zPages - -Enables an extension that serves zPages, an HTTP endpoint that provides live -data for debugging different components that were properly instrumented for such. -All core exporters and receivers provide some zPages instrumentation. - -The following settings are required: - -- `endpoint` (default = localhost:55679): Specifies the HTTP endpoint that serves -zPages. - -Example: - -```yaml -extensions: - zpages: -``` - -The full list of settings exposed for this exporter are documented [here](zpagesextension/config.go) -with detailed sample configurations [here](zpagesextension/testdata/config.yaml). diff --git a/extension/pprofextension/README.md b/extension/pprofextension/README.md deleted file mode 100644 index d69bcf1bc76..00000000000 --- a/extension/pprofextension/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Performance Profiler - -Performance Profiler extension enables the golang `net/http/pprof` endpoint. -This is typically used by developers to collect performance profiles and -investigate issues with the service. - -The following settings are required: - -- `endpoint` (default = localhost:1777): The endpoint in which the pprof will -be listening to. Use localhost: to make it available only locally, or -":" to make it available on all network interfaces. -- `block_profile_fraction` (default = 0): Fraction of blocking events that -are profiled. A value <= 0 disables profiling. See -https://golang.org/pkg/runtime/#SetBlockProfileRate for details. -- `mutex_profile_fraction` (default = 0): Fraction of mutex contention -events that are profiled. A value <= 0 disables profiling. See -https://golang.org/pkg/runtime/#SetMutexProfileFraction for details. - -The following settings can be optionally configured: - -- `save_to_file`: File name to save the CPU profile to. The profiling starts when the -Collector starts and is saved to the file when the Collector is terminated. - -Example: -```yaml - -extensions: - pprof: -``` - -The full list of settings exposed for this exporter are documented [here](./config.go) -with detailed sample configurations [here](./testdata/config.yaml). diff --git a/extension/pprofextension/config.go b/extension/pprofextension/config.go deleted file mode 100644 index 7866c805baa..00000000000 --- a/extension/pprofextension/config.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pprofextension - -import ( - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/confignet" -) - -// Config has the configuration for the extension enabling the golang -// net/http/pprof (Performance Profiler) extension. -type Config struct { - config.ExtensionSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct - - // TCPAddr is the address and port in which the pprof will be listening to. - // Use localhost: to make it available only locally, or ":" to - // make it available on all network interfaces. - TCPAddr confignet.TCPAddr `mapstructure:",squash"` - - // Fraction of blocking events that are profiled. A value <= 0 disables - // profiling. See https://golang.org/pkg/runtime/#SetBlockProfileRate for details. - BlockProfileFraction int `mapstructure:"block_profile_fraction"` - - // Fraction of mutex contention events that are profiled. A value <= 0 - // disables profiling. See https://golang.org/pkg/runtime/#SetMutexProfileFraction - // for details. - MutexProfileFraction int `mapstructure:"mutex_profile_fraction"` - - // Optional file name to save the CPU profile to. The profiling starts when the - // Collector starts and is saved to the file when the Collector is terminated. - SaveToFile string `mapstructure:"save_to_file"` -} - -var _ config.Extension = (*Config)(nil) - -// Validate checks if the extension configuration is valid -func (cfg *Config) Validate() error { - return nil -} diff --git a/extension/pprofextension/config_test.go b/extension/pprofextension/config_test.go deleted file mode 100644 index 7cce52a503d..00000000000 --- a/extension/pprofextension/config_test.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pprofextension - -import ( - "path" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/config/configtest" -) - -func TestLoadConfig(t *testing.T) { - factories, err := componenttest.NopFactories() - assert.NoError(t, err) - - factory := NewFactory() - factories.Extensions[typeStr] = factory - cfg, err := configtest.LoadConfigAndValidate(path.Join(".", "testdata", "config.yaml"), factories) - - require.Nil(t, err) - require.NotNil(t, cfg) - - ext0 := cfg.Extensions[config.NewID(typeStr)] - assert.Equal(t, factory.CreateDefaultConfig(), ext0) - - ext1 := cfg.Extensions[config.NewIDWithName(typeStr, "1")] - assert.Equal(t, - &Config{ - ExtensionSettings: config.NewExtensionSettings(config.NewIDWithName(typeStr, "1")), - TCPAddr: confignet.TCPAddr{Endpoint: "0.0.0.0:1777"}, - BlockProfileFraction: 3, - MutexProfileFraction: 5, - }, - ext1) - - assert.Equal(t, 1, len(cfg.Service.Extensions)) - assert.Equal(t, config.NewIDWithName(typeStr, "1"), cfg.Service.Extensions[0]) -} diff --git a/extension/pprofextension/doc.go b/extension/pprofextension/doc.go deleted file mode 100644 index a16e8b7624e..00000000000 --- a/extension/pprofextension/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package pprofextension implements an extension that exposes the golang -// net/http/pprof (Performance Profiler) in a HTTP endpoint. -package pprofextension diff --git a/extension/pprofextension/factory.go b/extension/pprofextension/factory.go deleted file mode 100644 index ac9f161f8db..00000000000 --- a/extension/pprofextension/factory.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pprofextension - -import ( - "context" - "errors" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/extension/extensionhelper" -) - -const ( - // The value of extension "type" in configuration. - typeStr = "pprof" - - defaultEndpoint = "localhost:1777" -) - -// NewFactory creates a factory for pprof extension. -func NewFactory() component.ExtensionFactory { - return extensionhelper.NewFactory( - typeStr, - createDefaultConfig, - createExtension) -} - -func createDefaultConfig() config.Extension { - return &Config{ - ExtensionSettings: config.NewExtensionSettings(config.NewID(typeStr)), - TCPAddr: confignet.TCPAddr{ - Endpoint: defaultEndpoint, - }, - } -} - -func createExtension(_ context.Context, set component.ExtensionCreateSettings, cfg config.Extension) (component.Extension, error) { - config := cfg.(*Config) - if config.TCPAddr.Endpoint == "" { - return nil, errors.New("\"endpoint\" is required when using the \"pprof\" extension") - } - - return newServer(*config, set.Logger), nil -} diff --git a/extension/pprofextension/factory_test.go b/extension/pprofextension/factory_test.go deleted file mode 100644 index 700f6cd6205..00000000000 --- a/extension/pprofextension/factory_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pprofextension - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/internal/testutil" -) - -func TestFactory_CreateDefaultConfig(t *testing.T) { - cfg := createDefaultConfig() - assert.Equal(t, &Config{ - ExtensionSettings: config.NewExtensionSettings(config.NewID(typeStr)), - TCPAddr: confignet.TCPAddr{Endpoint: defaultEndpoint}, - }, - cfg) - - assert.NoError(t, configcheck.ValidateConfig(cfg)) - ext, err := createExtension(context.Background(), componenttest.NewNopExtensionCreateSettings(), cfg) - require.NoError(t, err) - require.NotNil(t, ext) -} - -func TestFactory_CreateExtension(t *testing.T) { - cfg := createDefaultConfig().(*Config) - cfg.TCPAddr.Endpoint = testutil.GetAvailableLocalAddress(t) - - ext, err := createExtension(context.Background(), componenttest.NewNopExtensionCreateSettings(), cfg) - require.NoError(t, err) - require.NotNil(t, ext) -} diff --git a/extension/pprofextension/pprofextension.go b/extension/pprofextension/pprofextension.go deleted file mode 100644 index 3825dfc3569..00000000000 --- a/extension/pprofextension/pprofextension.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pprofextension - -import ( - "context" - "errors" - "net" - "net/http" - _ "net/http/pprof" // #nosec Needed to enable the performance profiler - "os" - "runtime" - "runtime/pprof" - "sync/atomic" - "unsafe" - - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component" -) - -// Tracks that only a single instance is active per process. -// See comment on Start method for the reasons for that. -var activeInstance *pprofExtension - -// #nosec G103 -var activeInstancePtr = (*unsafe.Pointer)(unsafe.Pointer(&activeInstance)) - -type pprofExtension struct { - config Config - logger *zap.Logger - file *os.File - server http.Server - stopCh chan struct{} -} - -func (p *pprofExtension) Start(_ context.Context, host component.Host) error { - // The runtime settings are global to the application, so while in principle it - // is possible to have more than one instance, running multiple will mean that - // the settings of the last started instance will prevail. In order to avoid - // this issue we will allow the start of a single instance once per process - // Summary: only a single instance can be running in the same process. - // #nosec G103 - if !atomic.CompareAndSwapPointer(activeInstancePtr, nil, unsafe.Pointer(p)) { - return errors.New("only a single pprof extension instance can be running per process") - } - - // Take care that if any error happen when starting the active instance is cleaned. - var startErr error - defer func() { - if startErr != nil { - atomic.StorePointer(activeInstancePtr, nil) - } - }() - - // Start the listener here so we can have earlier failure if port is - // already in use. - var ln net.Listener - ln, startErr = p.config.TCPAddr.Listen() - if startErr != nil { - return startErr - } - - runtime.SetBlockProfileRate(p.config.BlockProfileFraction) - runtime.SetMutexProfileFraction(p.config.MutexProfileFraction) - - p.logger.Info("Starting net/http/pprof server", zap.Any("config", p.config)) - p.stopCh = make(chan struct{}) - go func() { - defer close(p.stopCh) - - // The listener ownership goes to the server. - err := p.server.Serve(ln) - atomic.StorePointer(activeInstancePtr, nil) - if err != nil && err != http.ErrServerClosed { - host.ReportFatalError(err) - } - }() - - if p.config.SaveToFile != "" { - var f *os.File - f, startErr = os.Create(p.config.SaveToFile) - if startErr != nil { - return startErr - } - p.file = f - startErr = pprof.StartCPUProfile(f) - } - - return startErr -} - -func (p *pprofExtension) Shutdown(context.Context) error { - defer atomic.StorePointer(activeInstancePtr, nil) - if p.file != nil { - pprof.StopCPUProfile() - _ = p.file.Close() // ignore the error - } - err := p.server.Close() - if p.stopCh != nil { - <-p.stopCh - } - return err -} - -func newServer(config Config, logger *zap.Logger) *pprofExtension { - return &pprofExtension{ - config: config, - logger: logger, - } -} diff --git a/extension/pprofextension/pprofextension_test.go b/extension/pprofextension/pprofextension_test.go deleted file mode 100644 index 50e15b51e71..00000000000 --- a/extension/pprofextension/pprofextension_test.go +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pprofextension - -import ( - "context" - "io/ioutil" - "net" - "net/http" - "os" - "runtime" - "testing" - - "github.com/stretchr/testify/require" - "go.uber.org/zap" - - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/confignet" - "go.opentelemetry.io/collector/internal/testutil" -) - -func TestPerformanceProfilerExtensionUsage(t *testing.T) { - config := Config{ - TCPAddr: confignet.TCPAddr{ - Endpoint: testutil.GetAvailableLocalAddress(t), - }, - BlockProfileFraction: 3, - MutexProfileFraction: 5, - } - - pprofExt := newServer(config, zap.NewNop()) - require.NotNil(t, pprofExt) - - require.NoError(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) - t.Cleanup(func() { require.NoError(t, pprofExt.Shutdown(context.Background())) }) - - // Give a chance for the server goroutine to run. - runtime.Gosched() - - _, pprofPort, err := net.SplitHostPort(config.TCPAddr.Endpoint) - require.NoError(t, err) - - client := &http.Client{} - resp, err := client.Get("http://localhost:" + pprofPort + "/debug/pprof") - require.NoError(t, err) - defer resp.Body.Close() - - require.Equal(t, http.StatusOK, resp.StatusCode) -} - -func TestPerformanceProfilerExtensionPortAlreadyInUse(t *testing.T) { - endpoint := testutil.GetAvailableLocalAddress(t) - ln, err := net.Listen("tcp", endpoint) - require.NoError(t, err) - defer ln.Close() - - config := Config{ - TCPAddr: confignet.TCPAddr{ - Endpoint: endpoint, - }, - } - pprofExt := newServer(config, zap.NewNop()) - require.NotNil(t, pprofExt) - - require.Error(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) -} - -func TestPerformanceProfilerMultipleStarts(t *testing.T) { - config := Config{ - TCPAddr: confignet.TCPAddr{ - Endpoint: testutil.GetAvailableLocalAddress(t), - }, - } - - pprofExt := newServer(config, zap.NewNop()) - require.NotNil(t, pprofExt) - - require.NoError(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) - t.Cleanup(func() { require.NoError(t, pprofExt.Shutdown(context.Background())) }) - - // The instance is already active it will fail. - require.Error(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) -} - -func TestPerformanceProfilerMultipleShutdowns(t *testing.T) { - config := Config{ - TCPAddr: confignet.TCPAddr{ - Endpoint: testutil.GetAvailableLocalAddress(t), - }, - } - - pprofExt := newServer(config, zap.NewNop()) - require.NotNil(t, pprofExt) - - require.NoError(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) - require.NoError(t, pprofExt.Shutdown(context.Background())) - require.NoError(t, pprofExt.Shutdown(context.Background())) -} - -func TestPerformanceProfilerShutdownWithoutStart(t *testing.T) { - config := Config{ - TCPAddr: confignet.TCPAddr{ - Endpoint: testutil.GetAvailableLocalAddress(t), - }, - } - - pprofExt := newServer(config, zap.NewNop()) - require.NotNil(t, pprofExt) - - require.NoError(t, pprofExt.Shutdown(context.Background())) -} - -func TestPerformanceProfilerLifecycleWithFile(t *testing.T) { - tmpFile, err := ioutil.TempFile("", "pprof*.yaml") - require.NoError(t, err) - defer func() { - os.Remove(tmpFile.Name()) - }() - require.NoError(t, tmpFile.Close()) - - config := Config{ - TCPAddr: confignet.TCPAddr{ - Endpoint: testutil.GetAvailableLocalAddress(t), - }, - SaveToFile: tmpFile.Name(), - } - - pprofExt := newServer(config, zap.NewNop()) - require.NotNil(t, pprofExt) - - require.NoError(t, pprofExt.Start(context.Background(), componenttest.NewNopHost())) - require.NoError(t, pprofExt.Shutdown(context.Background())) -} diff --git a/extension/pprofextension/testdata/config.yaml b/extension/pprofextension/testdata/config.yaml deleted file mode 100644 index 9f5cad07647..00000000000 --- a/extension/pprofextension/testdata/config.yaml +++ /dev/null @@ -1,22 +0,0 @@ -extensions: - pprof: - pprof/1: - endpoint: "0.0.0.0:1777" - block_profile_fraction: 3 - mutex_profile_fraction: 5 - -service: - extensions: [pprof/1] - pipelines: - traces: - receivers: [nop] - processors: [nop] - exporters: [nop] - -# Data pipeline is required to load the config. -receivers: - nop: -processors: - nop: -exporters: - nop: diff --git a/service/defaultcomponents/default_extensions_test.go b/service/defaultcomponents/default_extensions_test.go index 05ea1f632d5..c41ddcab202 100644 --- a/service/defaultcomponents/default_extensions_test.go +++ b/service/defaultcomponents/default_extensions_test.go @@ -25,7 +25,6 @@ import ( "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/extension/ballastextension" - "go.opentelemetry.io/collector/extension/pprofextension" "go.opentelemetry.io/collector/extension/zpagesextension" "go.opentelemetry.io/collector/internal/testutil" ) @@ -41,14 +40,6 @@ func TestDefaultExtensions(t *testing.T) { extension config.Type getConfigFn getExtensionConfigFn }{ - { - extension: "pprof", - getConfigFn: func() config.Extension { - cfg := extFactories["pprof"].CreateDefaultConfig().(*pprofextension.Config) - cfg.TCPAddr.Endpoint = endpoint - return cfg - }, - }, { extension: "zpages", getConfigFn: func() config.Extension { diff --git a/service/defaultcomponents/defaults.go b/service/defaultcomponents/defaults.go index 2c718004f50..73ccdc0c56d 100644 --- a/service/defaultcomponents/defaults.go +++ b/service/defaultcomponents/defaults.go @@ -22,7 +22,6 @@ import ( "go.opentelemetry.io/collector/exporter/otlpexporter" "go.opentelemetry.io/collector/exporter/otlphttpexporter" "go.opentelemetry.io/collector/extension/ballastextension" - "go.opentelemetry.io/collector/extension/pprofextension" "go.opentelemetry.io/collector/extension/zpagesextension" "go.opentelemetry.io/collector/processor/batchprocessor" "go.opentelemetry.io/collector/processor/memorylimiter" @@ -38,7 +37,6 @@ func Components() ( var errs []error extensions, err := component.MakeExtensionFactoryMap( - pprofextension.NewFactory(), zpagesextension.NewFactory(), ballastextension.NewFactory(), ) diff --git a/service/parserprovider/testdata/otelcol-config.yaml b/service/parserprovider/testdata/otelcol-config.yaml index b29cbd0f63b..0858017c1dc 100644 --- a/service/parserprovider/testdata/otelcol-config.yaml +++ b/service/parserprovider/testdata/otelcol-config.yaml @@ -11,11 +11,12 @@ processors: batch: extensions: - pprof: + memory_ballast: + size_mib: 512 zpages: service: - extensions: [pprof, zpages] + extensions: [memory_ballast, zpages] pipelines: traces: receivers: [otlp]