-
Notifications
You must be signed in to change notification settings - Fork 21
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
Refactor splunkhttp config processing #40
Conversation
@@ -23,23 +23,22 @@ import ( | |||
"go.opentelemetry.io/otel/oteltest" | |||
) | |||
|
|||
func TestTraceResponseHeaderMiddleware(t *testing.T) { |
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.
Moved to trace_response_header_test.go
@@ -23,12 +23,13 @@ import ( | |||
"go.opentelemetry.io/otel/oteltest" | |||
) | |||
|
|||
func TestNewHandlerTraceResponseHeaderDisabled(t *testing.T) { |
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.
Moved to handler_test.go
Really like the net effect it has on API. Implementation looks fine and can be improve/changed later. 👍 |
@owais @MrAlias Moreover, we could publish the first release of https://github.com/signalfx/splunk-otel-go 😉 However, there are good remarks in open-telemetry/opentelemetry-go-contrib#746 (comment) |
That looks pretty good to me. Only concern is that this works with the HTTP handler. Will it work with other types of instrumentations as easily? |
This PR and current design on But this proposal will. I will make a PR on Monday |
Yeah, I meant the proposal. 👍 |
Why
#30 (comment)
Make the functional options API more user-friendly.
Currently, sample usage looks like this:
What
Refactor config processing in
splunkhttp
package.The changes allows achieving the following usage:
splunkhttp.WithOTelOpts()
is no longer needed.Deeper analysis and comparison to other possible approaches can be found here: open-telemetry/opentelemetry-go-contrib#746
Moreover, some tests were moved to appropriate files (see comments in PR).