Skip to content

Exclude /health endpoint from being traced in distributed tracing #7494

Open
@srenatus

Description

@srenatus

Discussed in https://github.com/orgs/open-policy-agent/discussions/686

Originally posted by loekensgard April 4, 2025
Hi,

I am currently configuring distributed tracing for OPA using the following configuration:

distributed_tracing:
  type: grpc
  address: <address>
  service_name: <custom_name>
  resource:
    deployment_environment: Dev/Qa/Prod

I would like to know if there is a way to exclude the /health endpoint from being traced. I am aware that other languages have filters to support this functionality, but I couldn't find any documentation for OPA regarding this.

Any guidance or suggestions would be greatly appreciated.

Thank you!

Additionally, it would be helpful if we could configure it to exclude the /health endpoint from tracing only if the response status is 200. If the /health endpoint returns a 400 status or higher, it should still be logged.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions