-
Notifications
You must be signed in to change notification settings - Fork 583
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
otelmemcache: Simplify config and span status setting #477
Changes from 4 commits
ab502b8
03817da
74e4c91
6bc4032
6cb30d6
1aba6ab
c8682b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,25 +18,11 @@ import ( | |
oteltrace "go.opentelemetry.io/otel/trace" | ||
) | ||
|
||
type config struct { | ||
serviceName string | ||
tracerProvider oteltrace.TracerProvider | ||
} | ||
|
||
// Option is used to configure the client. | ||
type Option func(*config) | ||
type Option oteltrace.TracerProvider | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably stick with a generic Option type like we had before. Even though we only have a single option now, we may want to add others in the future. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, now I see this could potentially be a breaking change, good point 👍. I'll keep the type as it was. |
||
|
||
// WithTracerProvider specifies a tracer provider to use for creating a tracer. | ||
// If none is specified, the global provider is used. | ||
func WithTracerProvider(provider oteltrace.TracerProvider) Option { | ||
return func(cfg *config) { | ||
cfg.tracerProvider = provider | ||
} | ||
} | ||
|
||
// WithServiceName sets the service name. | ||
func WithServiceName(serviceName string) Option { | ||
return func(cfg *config) { | ||
cfg.serviceName = serviceName | ||
} | ||
return provider | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit