Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] use otel-go config package to configure MeterProvider #10601

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions internal/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func GetAvailableLocalIPv6Address(t testing.TB) string {
return endpoint
}

func ptr[T any](v T) *T {
return &v
}

func GetAvailableLocalAddressPrometheus(t testing.TB) *config.Prometheus {
address := GetAvailableLocalAddress(t)
host, port, err := net.SplitHostPort(address)
Expand All @@ -97,8 +101,14 @@ func GetAvailableLocalAddressPrometheus(t testing.TB) *config.Prometheus {
return nil
}
return &config.Prometheus{
Host: &host,
Port: &portInt,
Host: &host,
Port: &portInt,
WithoutScopeInfo: ptr(true),
WithoutTypeSuffix: ptr(true),
WithoutUnits: ptr(true),
WithResourceConstantLabels: &config.IncludeExclude{
Included: []string{"*"},
},
}
}

Expand Down
6 changes: 3 additions & 3 deletions service/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ require (
go.opentelemetry.io/contrib/config v0.8.0
go.opentelemetry.io/contrib/propagators/b3 v1.28.0
go.opentelemetry.io/otel v1.28.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0
go.opentelemetry.io/otel/exporters/prometheus v0.50.0
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.28.0
go.opentelemetry.io/otel/metric v1.28.0
go.opentelemetry.io/otel/sdk v1.28.0
go.opentelemetry.io/otel/sdk/metric v1.28.0
Expand Down Expand Up @@ -91,9 +88,12 @@ require (
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/contrib/zpages v0.53.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0 // indirect
go.opentelemetry.io/otel/log v0.4.0 // indirect
go.opentelemetry.io/otel/sdk/log v0.4.0 // indirect
Expand Down
347 changes: 0 additions & 347 deletions service/internal/proctelemetry/config.go

This file was deleted.

Loading
Loading