Skip to content

Partial mux tracing #5619

Answered by dmathieu
appiepollo14 asked this question in Q&A
Jul 15, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You can do this using the WithFilter option.
Something like this:

handler := otelhttp.NewHandler(mux, "/", otelhttp.WithFilter(func(r *http.Request) bool {
  if (r.URL.Path == "/health" || r.URL.Path == "/ready") {
    return false
  }

  return true
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@appiepollo14
Comment options

Answer selected by appiepollo14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants