Skip to content

Commit

Permalink
Merge branch 'main' into add-time-window-get-trace-anonymizer
Browse files Browse the repository at this point in the history
  • Loading branch information
yurishkuro authored Dec 17, 2024
2 parents 515ecdf + d8984bb commit f316405
Show file tree
Hide file tree
Showing 9 changed files with 206 additions and 247 deletions.
8 changes: 1 addition & 7 deletions cmd/collector/app/handler/otlp_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/component/componentstatus"
"go.opentelemetry.io/collector/config/confignet"
"go.opentelemetry.io/collector/config/configtelemetry"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/collector/pdata/ptrace"
"go.opentelemetry.io/collector/pipeline"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/otlpreceiver"
"go.opentelemetry.io/otel/metric"
noopmetric "go.opentelemetry.io/otel/metric/noop"
nooptrace "go.opentelemetry.io/otel/trace/noop"
"go.uber.org/zap"
Expand Down Expand Up @@ -70,11 +68,7 @@ func startOTLPReceiver(
TelemetrySettings: component.TelemetrySettings{
Logger: logger,
TracerProvider: nooptrace.NewTracerProvider(),
// TODO wire this with jaegerlib metrics?
LeveledMeterProvider: func(_ configtelemetry.Level) metric.MeterProvider {
return noopmetric.NewMeterProvider()
},
MeterProvider: noopmetric.NewMeterProvider(),
MeterProvider: noopmetric.NewMeterProvider(),
},
}

Expand Down
8 changes: 1 addition & 7 deletions cmd/collector/app/handler/zipkin_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ import (

"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/configtelemetry"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/otel/metric"
noopmetric "go.opentelemetry.io/otel/metric/noop"
nooptrace "go.opentelemetry.io/otel/trace/noop"
"go.uber.org/zap"
Expand Down Expand Up @@ -61,11 +59,7 @@ func startZipkinReceiver(
TelemetrySettings: component.TelemetrySettings{
Logger: logger,
TracerProvider: nooptrace.NewTracerProvider(),
// TODO wire this with jaegerlib metrics?
LeveledMeterProvider: func(_ configtelemetry.Level) metric.MeterProvider {
return noopmetric.NewMeterProvider()
},
MeterProvider: noopmetric.NewMeterProvider(),
MeterProvider: noopmetric.NewMeterProvider(),
},
}

Expand Down
12 changes: 2 additions & 10 deletions cmd/jaeger/internal/exporters/storageexporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/configtelemetry"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/ptrace"
"go.opentelemetry.io/otel/metric"
noopmetric "go.opentelemetry.io/otel/metric/noop"
nooptrace "go.opentelemetry.io/otel/trace/noop"
"go.uber.org/zap/zaptest"
Expand Down Expand Up @@ -105,10 +103,7 @@ func TestExporter(t *testing.T) {
telemetrySettings := component.TelemetrySettings{
Logger: zaptest.NewLogger(t),
TracerProvider: nooptrace.NewTracerProvider(),
LeveledMeterProvider: func(_ configtelemetry.Level) metric.MeterProvider {
return noopmetric.NewMeterProvider()
},
MeterProvider: noopmetric.NewMeterProvider(),
MeterProvider: noopmetric.NewMeterProvider(),
}

const memstoreName = "memstore"
Expand Down Expand Up @@ -165,10 +160,7 @@ func makeStorageExtension(t *testing.T, memstoreName string) component.Host {
telemetrySettings := component.TelemetrySettings{
Logger: zaptest.NewLogger(t),
TracerProvider: nooptrace.NewTracerProvider(),
LeveledMeterProvider: func(_ configtelemetry.Level) metric.MeterProvider {
return noopmetric.NewMeterProvider()
},
MeterProvider: noopmetric.NewMeterProvider(),
MeterProvider: noopmetric.NewMeterProvider(),
}
extensionFactory := jaegerstorage.NewFactory()
storageExtension, err := extensionFactory.Create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/config/configgrpc"
"go.opentelemetry.io/collector/config/configtelemetry"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/otel/metric"
noopmetric "go.opentelemetry.io/otel/metric/noop"
nooptrace "go.opentelemetry.io/otel/trace/noop"
"go.uber.org/zap"
Expand Down Expand Up @@ -256,10 +254,7 @@ func noopTelemetrySettings() component.TelemetrySettings {
return component.TelemetrySettings{
Logger: zap.L(),
TracerProvider: nooptrace.NewTracerProvider(),
LeveledMeterProvider: func(_ configtelemetry.Level) metric.MeterProvider {
return noopmetric.NewMeterProvider()
},
MeterProvider: noopmetric.NewMeterProvider(),
MeterProvider: noopmetric.NewMeterProvider(),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ import (
"go.opentelemetry.io/collector/config/configgrpc"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/config/confignet"
"go.opentelemetry.io/collector/config/configtelemetry"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/otel/metric"
noopmetric "go.opentelemetry.io/otel/metric/noop"
nooptrace "go.opentelemetry.io/otel/trace/noop"
"go.uber.org/zap"
Expand All @@ -39,10 +37,7 @@ func makeStorageExtension(t *testing.T, memstoreName string) component.Host {
telemetrySettings := component.TelemetrySettings{
Logger: zaptest.NewLogger(t),
TracerProvider: nooptrace.NewTracerProvider(),
LeveledMeterProvider: func(_ configtelemetry.Level) metric.MeterProvider {
return noopmetric.NewMeterProvider()
},
MeterProvider: noopmetric.NewMeterProvider(),
MeterProvider: noopmetric.NewMeterProvider(),
}
extensionFactory := jaegerstorage.NewFactory()
storageExtension, err := extensionFactory.Create(
Expand Down
12 changes: 2 additions & 10 deletions cmd/jaeger/internal/processors/adaptivesampling/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/storagetest"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/configtelemetry"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/collector/pdata/ptrace"
"go.opentelemetry.io/otel/metric"
noopmetric "go.opentelemetry.io/otel/metric/noop"
nooptrace "go.opentelemetry.io/otel/trace/noop"
"go.uber.org/zap"
Expand All @@ -31,10 +29,7 @@ func makeStorageExtension(t *testing.T, memstoreName string) component.Host {
telemetrySettings := component.TelemetrySettings{
Logger: zaptest.NewLogger(t),
TracerProvider: nooptrace.NewTracerProvider(),
LeveledMeterProvider: func(_ configtelemetry.Level) metric.MeterProvider {
return noopmetric.NewMeterProvider()
},
MeterProvider: noopmetric.NewMeterProvider(),
MeterProvider: noopmetric.NewMeterProvider(),
}
extensionFactory := jaegerstorage.NewFactory()
storageExtension, err := extensionFactory.Create(
Expand Down Expand Up @@ -95,10 +90,7 @@ func TestNewTraceProcessor(t *testing.T) {

func TestTraceProcessor(t *testing.T) {
telemetrySettings := component.TelemetrySettings{
Logger: zaptest.NewLogger(t, zaptest.WrapOptions(zap.AddCaller())),
LeveledMeterProvider: func(_ configtelemetry.Level) metric.MeterProvider {
return noopmetric.NewMeterProvider()
},
Logger: zaptest.NewLogger(t, zaptest.WrapOptions(zap.AddCaller())),
MeterProvider: noopmetric.NewMeterProvider(),
}
config := createDefaultConfig().(*Config)
Expand Down
130 changes: 65 additions & 65 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,40 +44,40 @@ require (
github.com/stretchr/testify v1.10.0
github.com/uber/jaeger-client-go v2.30.0+incompatible
github.com/xdg-go/scram v1.1.2
go.opentelemetry.io/collector/component v0.115.0
go.opentelemetry.io/collector/component/componentstatus v0.115.0
go.opentelemetry.io/collector/component/componenttest v0.115.0
go.opentelemetry.io/collector/config/configauth v0.115.0
go.opentelemetry.io/collector/config/configgrpc v0.115.0
go.opentelemetry.io/collector/config/confighttp v0.115.0
go.opentelemetry.io/collector/config/configretry v1.21.0
go.opentelemetry.io/collector/config/configtls v1.21.0
go.opentelemetry.io/collector/confmap v1.21.0
go.opentelemetry.io/collector/confmap/provider/envprovider v1.21.0
go.opentelemetry.io/collector/confmap/provider/fileprovider v1.21.0
go.opentelemetry.io/collector/confmap/provider/httpprovider v1.21.0
go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.21.0
go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.21.0
go.opentelemetry.io/collector/connector v0.115.0
go.opentelemetry.io/collector/connector/forwardconnector v0.115.0
go.opentelemetry.io/collector/consumer v1.21.0
go.opentelemetry.io/collector/consumer/consumertest v0.115.0
go.opentelemetry.io/collector/exporter v0.115.0
go.opentelemetry.io/collector/exporter/exportertest v0.115.0
go.opentelemetry.io/collector/exporter/otlpexporter v0.115.0
go.opentelemetry.io/collector/exporter/otlphttpexporter v0.115.0
go.opentelemetry.io/collector/extension v0.115.0
go.opentelemetry.io/collector/extension/extensiontest v0.115.0
go.opentelemetry.io/collector/extension/zpagesextension v0.115.0
go.opentelemetry.io/collector/otelcol v0.115.0
go.opentelemetry.io/collector/pdata v1.21.0
go.opentelemetry.io/collector/pipeline v0.115.0
go.opentelemetry.io/collector/processor v0.115.0
go.opentelemetry.io/collector/processor/batchprocessor v0.115.0
go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.115.0
go.opentelemetry.io/collector/processor/processortest v0.115.0
go.opentelemetry.io/collector/receiver v0.115.0
go.opentelemetry.io/collector/receiver/otlpreceiver v0.115.0
go.opentelemetry.io/collector/component v0.116.0
go.opentelemetry.io/collector/component/componentstatus v0.116.0
go.opentelemetry.io/collector/component/componenttest v0.116.0
go.opentelemetry.io/collector/config/configauth v0.116.0
go.opentelemetry.io/collector/config/configgrpc v0.116.0
go.opentelemetry.io/collector/config/confighttp v0.116.0
go.opentelemetry.io/collector/config/configretry v1.22.0
go.opentelemetry.io/collector/config/configtls v1.22.0
go.opentelemetry.io/collector/confmap v1.22.0
go.opentelemetry.io/collector/confmap/provider/envprovider v1.22.0
go.opentelemetry.io/collector/confmap/provider/fileprovider v1.22.0
go.opentelemetry.io/collector/confmap/provider/httpprovider v1.22.0
go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.22.0
go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.22.0
go.opentelemetry.io/collector/connector v0.116.0
go.opentelemetry.io/collector/connector/forwardconnector v0.116.0
go.opentelemetry.io/collector/consumer v1.22.0
go.opentelemetry.io/collector/consumer/consumertest v0.116.0
go.opentelemetry.io/collector/exporter v0.116.0
go.opentelemetry.io/collector/exporter/exportertest v0.116.0
go.opentelemetry.io/collector/exporter/otlpexporter v0.116.0
go.opentelemetry.io/collector/exporter/otlphttpexporter v0.116.0
go.opentelemetry.io/collector/extension v0.116.0
go.opentelemetry.io/collector/extension/extensiontest v0.116.0
go.opentelemetry.io/collector/extension/zpagesextension v0.116.0
go.opentelemetry.io/collector/otelcol v0.116.0
go.opentelemetry.io/collector/pdata v1.22.0
go.opentelemetry.io/collector/pipeline v0.116.0
go.opentelemetry.io/collector/processor v0.116.0
go.opentelemetry.io/collector/processor/batchprocessor v0.116.0
go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.116.0
go.opentelemetry.io/collector/processor/processortest v0.116.0
go.opentelemetry.io/collector/receiver v0.116.0
go.opentelemetry.io/collector/receiver/otlpreceiver v0.116.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0
go.opentelemetry.io/contrib/samplers/jaegerremote v0.27.0
Expand All @@ -97,7 +97,7 @@ require (
golang.org/x/net v0.32.0
golang.org/x/sys v0.28.0
google.golang.org/grpc v1.69.0
google.golang.org/protobuf v1.35.2
google.golang.org/protobuf v1.36.0
gopkg.in/yaml.v3 v3.0.1
)

Expand All @@ -109,15 +109,20 @@ require (
github.com/expr-lang/expr v1.16.9 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/status v0.115.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/collector/connector/connectortest v0.115.0 // indirect
go.opentelemetry.io/collector/consumer/consumererror v0.115.0 // indirect
go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/internal/fanoutconsumer v0.115.0 // indirect
go.opentelemetry.io/collector/internal/memorylimiter v0.115.0 // indirect
go.opentelemetry.io/collector/internal/sharedcomponent v0.115.0 // indirect
go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/receiver/receivertest v0.115.0 // indirect
go.opentelemetry.io/collector/connector/connectortest v0.116.0 // indirect
go.opentelemetry.io/collector/connector/xconnector v0.116.0 // indirect
go.opentelemetry.io/collector/consumer/consumererror v0.116.0 // indirect
go.opentelemetry.io/collector/consumer/consumererror/xconsumererror v0.116.0 // indirect
go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 // indirect
go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper v0.116.0 // indirect
go.opentelemetry.io/collector/exporter/xexporter v0.116.0 // indirect
go.opentelemetry.io/collector/internal/fanoutconsumer v0.116.0 // indirect
go.opentelemetry.io/collector/internal/memorylimiter v0.116.0 // indirect
go.opentelemetry.io/collector/internal/sharedcomponent v0.116.0 // indirect
go.opentelemetry.io/collector/pipeline/xpipeline v0.116.0 // indirect
go.opentelemetry.io/collector/processor/xprocessor v0.116.0 // indirect
go.opentelemetry.io/collector/receiver/receivertest v0.116.0 // indirect
go.opentelemetry.io/collector/receiver/xreceiver v0.116.0 // indirect
go.opentelemetry.io/contrib/bridges/otelzap v0.6.0 // indirect
)

Expand Down Expand Up @@ -229,27 +234,22 @@ require (
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/collector v0.115.0 // indirect
go.opentelemetry.io/collector/client v1.21.0 // indirect
go.opentelemetry.io/collector/config/configcompression v1.21.0 // indirect
go.opentelemetry.io/collector/config/confignet v1.21.0
go.opentelemetry.io/collector/config/configopaque v1.21.0
go.opentelemetry.io/collector/config/configtelemetry v0.115.0
go.opentelemetry.io/collector/config/internal v0.115.0 // indirect
go.opentelemetry.io/collector/connector/connectorprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/exporter/debugexporter v0.115.0
go.opentelemetry.io/collector/exporter/exporterprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/extension/auth v0.115.0 // indirect
go.opentelemetry.io/collector/extension/experimental/storage v0.115.0 // indirect
go.opentelemetry.io/collector/extension/extensioncapabilities v0.115.0
go.opentelemetry.io/collector/featuregate v1.21.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.115.0 // indirect
go.opentelemetry.io/collector/pdata/testdata v0.115.0 // indirect
go.opentelemetry.io/collector/processor/processorprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/receiver/receiverprofiles v0.115.0 // indirect
go.opentelemetry.io/collector/semconv v0.115.0 // indirect
go.opentelemetry.io/collector/service v0.115.0 // indirect
go.opentelemetry.io/collector v0.116.0 // indirect
go.opentelemetry.io/collector/client v1.22.0 // indirect
go.opentelemetry.io/collector/config/configcompression v1.22.0 // indirect
go.opentelemetry.io/collector/config/confignet v1.22.0
go.opentelemetry.io/collector/config/configopaque v1.22.0
go.opentelemetry.io/collector/config/configtelemetry v0.116.0
go.opentelemetry.io/collector/config/internal v0.116.0 // indirect
go.opentelemetry.io/collector/exporter/debugexporter v0.116.0
go.opentelemetry.io/collector/extension/auth v0.116.0 // indirect
go.opentelemetry.io/collector/extension/experimental/storage v0.116.0 // indirect
go.opentelemetry.io/collector/extension/extensioncapabilities v0.116.0
go.opentelemetry.io/collector/featuregate v1.22.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.116.0 // indirect
go.opentelemetry.io/collector/pdata/testdata v0.116.0 // indirect
go.opentelemetry.io/collector/semconv v0.116.0 // indirect
go.opentelemetry.io/collector/service v0.116.0 // indirect
go.opentelemetry.io/contrib/config v0.10.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.31.0 // indirect
go.opentelemetry.io/contrib/zpages v0.56.0 // indirect
Expand Down
Loading

0 comments on commit f316405

Please sign in to comment.