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

Use otel tracerProvider interface instead of specific type #21049

Merged
merged 2 commits into from
Jul 5, 2023
Merged
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
2 changes: 2 additions & 0 deletions sdk/tracing/azotel/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Breaking Changes

* The type for parameter `tracerProvider` in function `NewTracingProvider()` has changed to `trace.TracerProvider`.

### Bugs Fixed

### Other Changes
Expand Down
3 changes: 1 addition & 2 deletions sdk/tracing/azotel/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
otelsdk "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/trace"
)

Expand All @@ -26,7 +25,7 @@ type TracingProviderOptions struct {
// NewTracingProvider creates a new tracing.Provider that wraps the specified OpenTelemetry TracerProvider.
// - tracerProvider - the TracerProvider to wrap
// - opts - optional configuration. pass nil to accept the default values
func NewTracingProvider(tracerProvider *otelsdk.TracerProvider, opts *TracingProviderOptions) tracing.Provider {
func NewTracingProvider(tracerProvider trace.TracerProvider, opts *TracingProviderOptions) tracing.Provider {
return tracing.NewProvider(func(namespace, version string) tracing.Tracer {
tracer := tracerProvider.Tracer(namespace, trace.WithInstrumentationVersion(version), trace.WithSchemaURL("https://opentelemetry.io/schemas/1.17.0"))

Expand Down