-
Notifications
You must be signed in to change notification settings - Fork 492
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
Question: how to ignore healthcheck endpoint with otelmux #896
Comments
There are a couple ways to handle this. You can attach the middleware to a mux that doesn't route to the health check endpoint and then compose that with one that does the health check but doesn't have the middleware. Alternately, you could implement a custom sampler that samples out health check requests. Finally, the |
@Aneurysm9 I need similar functionality so I'm happy to work on a PR. Do you still prefer moving |
We're starting to use the Filter (and other attributes) in several places (the grpc instrumentation is the most recent one). |
@dmathieu thank you for the quick reply. I noticed that the |
Now thinking about this, making them shared may not be so easy, especially due to subtle differences with method signatures as we have in grpc. |
@dmathieu I agree with keeping the two separate. Are you opposed to just using |
If that were to happen, I think it would be better to have a shared/base package. |
We we're looking at this also at my company. Has there been any movement on this issue? We can look at picking it up if not. |
No, there hasn't been any movement yet. |
So looking to move the filter package out of otelhttp, internal directory seems to make the most sense. It only has a util package at the moment. Once that is moved to a shared/base package, otelhttp should only need imports changed. otelmux will need the filters config similar to otelhttp and filter called on the ServeHTTP method. |
We are using otelmux to instrument our gorilla mux requests. Is there a way to ignore /health endpoint ?
The text was updated successfully, but these errors were encountered: