Skip to content

Allow per-route tracing configuration #13466

@marvin-roesch

Description

@marvin-roesch

kgateway version

v2.2.0

Is your feature request related to a problem? Please describe.

Tracing configuration is currently global/per-port for a Gateway via ListenerPolicy. As an application developer, I might not want all my endpoints to be traced however, or only at a lower sample rate than the global setting. Furthermore, I want to be able to adjust the operation that gets reported for the generated spans to perform some grouping of related routes that all perform the same logical operation if desired.

Describe the solution you'd like

There should be an additional tracing section in TrafficPoliy.spec that mirrors Envoy's route-level Tracing config proto. When attached to an xRoute that supports tracing, this config should be adopted.

At least the client_sampling, random_sampling, overall_sampling, and operation options should be supported. upstream_operation might be nice to have as well and route-level custom tags could also be beneficial.

Describe alternatives you've considered

There is no alternative to this as "custom" per-route Envoy configurations cannot easily be attached. TrafficPolicy seems like the right place to put this.

Additional Context

I have also created #13465 to address operation naming on a listener/Gateway-level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions