Skip to content

Commit

Permalink
Add metricstransform processor to darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
tejaskokje-mw committed Sep 26, 2024
1 parent 2a69594 commit 72e8068
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
5 changes: 0 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,6 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ=
github.com/grafana/pyroscope-go v1.1.1/go.mod h1:Mw26jU7jsL/KStNSGGuuVYdUq7Qghem5P8aXYXSXG88=
github.com/grafana/pyroscope-go/godeltaprof v0.1.6 h1:nEdZ8louGAplSvIJi1HVp7kWvFvdiiYg3COLlTwJiFo=
github.com/grafana/pyroscope-go/godeltaprof v0.1.6/go.mod h1:Tk376Nbldo4Cha9RgiU7ik8WKFkNpfds98aUzS8omLE=
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 h1:iwOtYXeeVSAeYefJNaxDytgjKtUuKQbJqgAIjlnicKg=
github.com/grafana/pyroscope-go/godeltaprof v0.1.8/go.mod h1:2+l7K7twW49Ct4wFluZD3tZ6e0SjanjcUUBPVD/UuGU=
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww=
Expand Down Expand Up @@ -521,9 +519,6 @@ github.com/kardianos/service v1.2.2 h1:ZvePhAHfvo0A7Mftk/tEzqEZ7Q4lgnR8sGz4xu1YX
github.com/kardianos/service v1.2.2/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM=
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.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs=
Expand Down
2 changes: 2 additions & 0 deletions pkg/agent/hostagent_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor"
Expand Down Expand Up @@ -97,6 +98,7 @@ func (c *HostAgent) GetFactories(_ context.Context) (otelcol.Factories, error) {

factories.Processors, err = processor.MakeFactoryMap([]processor.Factory{
// frontend.NewProcessorFactory(),
metricstransformprocessor.NewFactory(),
batchprocessor.NewFactory(),
filterprocessor.NewFactory(),
memorylimiterprocessor.NewFactory(),
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/hostagent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func TestHostAgentGetFactories(t *testing.T) {
assertContainsComponent(t, factories.Exporters, "file")

// check if factories contain expected processors
assert.Len(t, factories.Processors, 9)
assert.Len(t, factories.Processors, 10)
assertContainsComponent(t, factories.Processors, "batch")
assertContainsComponent(t, factories.Processors, "filter")
assertContainsComponent(t, factories.Processors, "memory_limiter")
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/kubeagent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ func TestKubeAgentGetFactories(t *testing.T) {
assert.NotNil(t, factories.Processors)

// check that the returned factories contain the expected factories
assert.Len(t, factories.Extensions, 0)
assert.Len(t, factories.Extensions, 1)

// check if factories contains expected receivers
assert.Len(t, factories.Receivers, 9)
assert.Len(t, factories.Receivers, 10)
assertContainsComponent(t, factories.Receivers, "otlp")
assertContainsComponent(t, factories.Receivers, "fluentforward")
assertContainsComponent(t, factories.Receivers, "filelog")
Expand Down

0 comments on commit 72e8068

Please sign in to comment.