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

Allow overriding default ServeHTTP function #3

Closed
mariomac opened this issue Feb 21, 2023 · 1 comment
Closed

Allow overriding default ServeHTTP function #3

mariomac opened this issue Feb 21, 2023 · 1 comment
Assignees

Comments

@mariomac
Copy link
Contributor

For standard Go library, we are overriding the following function:

net/http.(*ServeMux).ServeHTTP

However, other programs might use a function with the same signature:

github.com/mariomac/goblog/src/assets.(*CachedHandler).ServeHTTP

https://github.com/mariomac/goblog/blob/main/src/assets/handler.go#L101

Just overriding the name should work.

@mariomac
Copy link
Contributor Author

Done through this configuration option: https://github.com/grafana/http-autoinstrument/blob/main/pkg/pipe/config.go#L8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant