Skip to content
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

Include the traceID (& parent trace id if available) in logs #438

Closed
1 of 3 tasks
R-Lawton opened this issue Feb 27, 2024 · 5 comments
Closed
1 of 3 tasks

Include the traceID (& parent trace id if available) in logs #438

R-Lawton opened this issue Feb 27, 2024 · 5 comments
Assignees

Comments

@R-Lawton
Copy link
Contributor

R-Lawton commented Feb 27, 2024

WHAT: Include TraceID in data plane component logs when tracing is enabled.

WHY: To allow logs to be correlated to tracing information for specific requests

  • TraceID in limitador
  • TraceID in authorino
  • TraceID in wasm-shim
@R-Lawton R-Lawton mentioned this issue Feb 27, 2024
8 tasks
@david-martin david-martin changed the title Include the traceID in logs Include the traceID (& parent trace id if available) in logs Feb 28, 2024
@david-martin david-martin self-assigned this Apr 5, 2024
@david-martin
Copy link
Contributor

This is already the case for limitador:

"Request received: Request { metadata: MetadataMap { headers: {"te": "trailers", "grpc-timeout": "5000m", "content-type": "application/grpc", "traceparent": "00-4a2a933a23df267aed612f4694b32141-00f067aa0ba902b7-01", "x-envoy-internal": "true", "x-envoy-expected-rq-timeout-ms": "5000"} }, message: RateLimitRequest { domain: "default/toystore", descriptors: [RateLimitDescriptor { entries: [Entry { key: "limit.general_user__f5646550", value: "1" }, Entry { key: "metadata.filter_metadata.envoy\\.filters\\.http\\.ext_authz.identity.userid", value: "alice" }], limit: None }], hits_addend: 1 }, extensions: Extensions }"

@guicassolato do you know if the traceid is logged out in authorino (even if log levels need to be increased)?

@guicassolato
Copy link
Contributor

@guicassolato do you know if the traceid is logged out in authorino (even if log levels need to be increased)?

The trace id is not logged in Authorino currently.

Authorino logs the request id, which in the traces will link to the trace id as a fixed attribute of all traces generated in the request flow.

@david-martin
Copy link
Contributor

which in the traces will link to the trace id as a fixed attribute of all traces generated in the request flow

Thanks @guicassolato
I'm wondering what the flow is for someone debugging and wanting to make the link between a trace and authorino logs.
Would they start with tracing, and see some 'tag' on the trace with the request id, then find that in authorino logs?
Or is it the other way around somehow?

Where I'm coming from here is having some info about how you might use tracing e2e to troubleshoot a request.

@guicassolato
Copy link
Contributor

which in the traces will link to the trace id as a fixed attribute of all traces generated in the request flow

Thanks @guicassolato I'm wondering what the flow is for someone debugging and wanting to make the link between a trace and authorino logs. Would they start with tracing, and see some 'tag' on the trace with the request id, then find that in authorino logs? Or is it the other way around somehow?

Where I'm coming from here is having some info about how you might use tracing e2e to troubleshoot a request.

If you have both enabled (tracing and logs), I supposed it doesn't really matter if you start from one of the other. I imagine the problem is when you don't have tracing enabled in Authorino, then the request id is pretty much useless, unless you also check the gateway logs where request id and the trace id must also show up linked together.

Probably, the best thing to do is make sure the trace id is present in the Authorino logs and avoid all this trouble.

@david-martin
Copy link
Contributor

Thanks @guicassolato
I'm closing this out with the information given.
That can be taken into account with the related docs issue for a tracing guide Kuadrant/docs.kuadrant.io#70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants