Skip to content

Commit

Permalink
Bump OTel collector to v0.98.0 (#2724)
Browse files Browse the repository at this point in the history
* bump version and fix the imports

* use featuregate version v1.5.0
  • Loading branch information
vasireddy99 authored Apr 29, 2024
1 parent 935463f commit a0e6a01
Show file tree
Hide file tree
Showing 6 changed files with 1,653 additions and 1,582 deletions.
482 changes: 245 additions & 237 deletions go.mod

Large diffs are not rendered by default.

1,052 changes: 539 additions & 513 deletions go.sum

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pkg/config/config_factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestGetCfgFactoryConfig(t *testing.T) {
cfg, err := provider.Get(context.Background(), factories)
require.NoError(t, err)
require.NotNil(t, cfg)
receiver := cfg.Receivers[component.NewID("awsxray")].(*awsxrayreceiver.Config)
receiver := cfg.Receivers[component.MustNewID("awsxray")].(*awsxrayreceiver.Config)
require.NotNil(t, receiver)
require.Equal(t, expectedEndpoint, receiver.Endpoint)
})
Expand All @@ -101,7 +101,7 @@ func TestGetCfgFactoryConfig(t *testing.T) {
cfg, err := provider.Get(context.Background(), factories)
require.NoError(t, err)
require.NotNil(t, cfg)
receiver := cfg.Receivers[component.NewID("awsxray")].(*awsxrayreceiver.Config)
receiver := cfg.Receivers[component.MustNewID("awsxray")].(*awsxrayreceiver.Config)
require.NotNil(t, receiver)
require.Empty(t, receiver.Endpoint)
})
Expand All @@ -118,10 +118,10 @@ func TestGetMapProviderContainer(t *testing.T) {
cfg, err := provider.Get(context.Background(), factories)
require.NoError(t, err)
require.NotNil(t, cfg)
extension := cfg.Extensions[component.NewID("pprof")].(*pprofextension.Config)
extension := cfg.Extensions[component.MustNewID("pprof")].(*pprofextension.Config)
require.NotNil(t, extension)
require.Equal(t, expectedEndpoint, extension.TCPAddr.Endpoint)

require.NotNil(t, cfg.Receivers[component.NewID("otlp")])
require.NotNil(t, cfg.Exporters[component.NewID("awsemf")])
require.NotNil(t, cfg.Receivers[component.MustNewID("otlp")])
require.NotNil(t, cfg.Exporters[component.MustNewID("awsemf")])
}
98 changes: 49 additions & 49 deletions pkg/defaultcomponents/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package defaultcomponents

import (
"go.opentelemetry.io/collector/component"
"testing"

"github.com/stretchr/testify/assert"
Expand All @@ -35,74 +36,73 @@ func TestComponents(t *testing.T) {
exporters := factories.Exporters
assert.Len(t, exporters, exportersCount)
// aws exporters
assert.NotNil(t, exporters["awsxray"])
assert.NotNil(t, exporters["awsemf"])
assert.NotNil(t, exporters[component.MustNewType("awsxray")])
assert.NotNil(t, exporters[component.MustNewType("awsemf")])
// core exporters
assert.NotNil(t, exporters["logging"])
assert.NotNil(t, exporters["otlp"])
assert.NotNil(t, exporters["otlphttp"])
assert.NotNil(t, exporters[component.MustNewType("logging")])
assert.NotNil(t, exporters[component.MustNewType("otlp")])
assert.NotNil(t, exporters[component.MustNewType("otlphttp")])
// other exporters
assert.NotNil(t, exporters["file"])
assert.NotNil(t, exporters["datadog"])
assert.NotNil(t, exporters["prometheus"])
assert.NotNil(t, exporters["sapm"])
assert.NotNil(t, exporters["signalfx"])
assert.NotNil(t, exporters["logzio"])
assert.NotNil(t, exporters["prometheusremotewrite"])
assert.NotNil(t, exporters["kafka"])
assert.NotNil(t, exporters["loadbalancing"])
assert.NotNil(t, exporters[component.MustNewType("file")])
assert.NotNil(t, exporters[component.MustNewType("datadog")])
assert.NotNil(t, exporters[component.MustNewType("prometheus")])
assert.NotNil(t, exporters[component.MustNewType("sapm")])
assert.NotNil(t, exporters[component.MustNewType("signalfx")])
assert.NotNil(t, exporters[component.MustNewType("logzio")])
assert.NotNil(t, exporters[component.MustNewType("prometheusremotewrite")])
assert.NotNil(t, exporters[component.MustNewType("kafka")])
assert.NotNil(t, exporters[component.MustNewType("loadbalancing")])

receivers := factories.Receivers
assert.Len(t, receivers, receiversCount)
// aws receivers
assert.NotNil(t, receivers["awsecscontainermetrics"])
assert.NotNil(t, receivers["awscontainerinsightreceiver"])
assert.NotNil(t, receivers["awsxray"])
assert.NotNil(t, receivers["statsd"])
assert.NotNil(t, exporters["awscloudwatchlogs"])
assert.NotNil(t, receivers[component.MustNewType("awsecscontainermetrics")])
assert.NotNil(t, receivers[component.MustNewType("awscontainerinsightreceiver")])
assert.NotNil(t, receivers[component.MustNewType("awsxray")])
assert.NotNil(t, receivers[component.MustNewType("statsd")])
assert.NotNil(t, exporters[component.MustNewType("awscloudwatchlogs")])

// core receivers
assert.NotNil(t, receivers["otlp"])
assert.NotNil(t, receivers[component.MustNewType("otlp")])
// other receivers
assert.NotNil(t, receivers["prometheus"])
assert.NotNil(t, receivers["zipkin"])
assert.NotNil(t, receivers["jaeger"])
assert.NotNil(t, receivers["kafka"])
assert.NotNil(t, receivers["filelog"])
assert.NotNil(t, receivers[component.MustNewType("prometheus")])
assert.NotNil(t, receivers[component.MustNewType("zipkin")])
assert.NotNil(t, receivers[component.MustNewType("jaeger")])
assert.NotNil(t, receivers[component.MustNewType("kafka")])
assert.NotNil(t, receivers[component.MustNewType("filelog")])

extensions := factories.Extensions
assert.Len(t, extensions, extensionsCount)
// aws extensions
assert.NotNil(t, extensions["awsproxy"])
assert.NotNil(t, extensions["ecs_observer"])
assert.NotNil(t, extensions["sigv4auth"])
assert.NotNil(t, extensions[component.MustNewType("awsproxy")])
assert.NotNil(t, extensions[component.MustNewType("ecs_observer")])
assert.NotNil(t, extensions[component.MustNewType("sigv4auth")])
// core extensions
assert.NotNil(t, extensions["zpages"])
assert.NotNil(t, extensions["memory_ballast"])
assert.NotNil(t, extensions[component.MustNewType("zpages")])
assert.NotNil(t, extensions[component.MustNewType("memory_ballast")])
// other extensions
assert.NotNil(t, extensions["pprof"])
assert.NotNil(t, extensions["health_check"])
assert.NotNil(t, extensions["file_storage"])
assert.NotNil(t, extensions[component.MustNewType("pprof")])
assert.NotNil(t, extensions[component.MustNewType("health_check")])
assert.NotNil(t, extensions[component.MustNewType("file_storage")])

processors := factories.Processors
assert.Len(t, processors, processorCount)
// aws processors
assert.NotNil(t, processors["experimental_metricsgeneration"])
assert.NotNil(t, processors[component.MustNewType("experimental_metricsgeneration")])
// core processors
assert.NotNil(t, processors["batch"])
assert.NotNil(t, processors["memory_limiter"])
assert.NotNil(t, processors[component.MustNewType("batch")])
assert.NotNil(t, processors[component.MustNewType("memory_limiter")])
// other processors
assert.NotNil(t, processors["attributes"])
assert.NotNil(t, processors["resource"])
assert.NotNil(t, processors["probabilistic_sampler"])
assert.NotNil(t, processors["span"])
assert.NotNil(t, processors["filter"])
assert.NotNil(t, processors["metricstransform"])
assert.NotNil(t, processors["resourcedetection"])
assert.NotNil(t, processors["cumulativetodelta"])
assert.NotNil(t, processors["deltatorate"])
assert.NotNil(t, processors["groupbytrace"])
assert.NotNil(t, processors["tail_sampling"])
assert.NotNil(t, processors["k8sattributes"])

assert.NotNil(t, processors[component.MustNewType("attributes")])
assert.NotNil(t, processors[component.MustNewType("resource")])
assert.NotNil(t, processors[component.MustNewType("probabilistic_sampler")])
assert.NotNil(t, processors[component.MustNewType("span")])
assert.NotNil(t, processors[component.MustNewType("filter")])
assert.NotNil(t, processors[component.MustNewType("metricstransform")])
assert.NotNil(t, processors[component.MustNewType("resourcedetection")])
assert.NotNil(t, processors[component.MustNewType("cumulativetodelta")])
assert.NotNil(t, processors[component.MustNewType("deltatorate")])
assert.NotNil(t, processors[component.MustNewType("groupbytrace")])
assert.NotNil(t, processors[component.MustNewType("tail_sampling")])
assert.NotNil(t, processors[component.MustNewType("k8sattributes")])
}
Loading

0 comments on commit a0e6a01

Please sign in to comment.