diff --git a/kong/observability.yaml b/kong/observability.yaml index b213c10..46a3ac2 100644 --- a/kong/observability.yaml +++ b/kong/observability.yaml @@ -6,6 +6,12 @@ # defines its own AI-specific versions of. Applying it here would duplicate # them, so the three observability plugins are declared locally instead, # with the same configuration as the shared template. +# +# That parity is manual and has already broken once: the propagation block +# below was added to the shared template and not here, so this gateway kept +# starting a fresh trace per request while the five domains propagated +# correctly. Any change to the shared template's observability plugins has to +# be mirrored here by hand. apiVersion: configuration.konghq.com/v1 kind: KongPlugin metadata: @@ -30,6 +36,23 @@ config: service.name: ${NAME} sampling_rate: 1 http_response_header_for_traceid: X-Trace-Id + # Without this block every hop starts its own trace: a single end-to-end + # transaction shows up in Tempo as a dozen unrelated traces, one per service. + # `extract` is what makes the gateway continue the caller's trace instead of + # opening a new one, and `inject` is what carries it to the upstream so the + # backend can continue it in turn. + # + # This gateway is where LibreChat enters, so without it the chain breaks at + # the very first hop and nothing downstream can be correlated. + propagation: + extract: + - w3c + - b3 + - jaeger + inject: + - w3c + default_format: w3c + clear: [] --- apiVersion: configuration.konghq.com/v1 kind: KongPlugin