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

opentelemetry: access logging traceid and span id #8765

Closed
lework opened this issue Feb 1, 2023 · 5 comments
Closed

opentelemetry: access logging traceid and span id #8765

lework opened this issue Feb 1, 2023 · 5 comments

Comments

@lework
Copy link
Contributor

lework commented Feb 1, 2023

Description

plugin: opentelemetry

How to record traceid and span id in access log?

@An-DJ
Copy link
Contributor

An-DJ commented Feb 1, 2023

@lework The plugin opentelemetry can only support tracing.

Ref: https://apisix.apache.org/docs/apisix/plugins/opentelemetry/

Could you describe your detailed use case?

@lework
Copy link
Contributor Author

lework commented Feb 1, 2023

you can refer to https://github.com/open-telemetry/opentelemetry-cpp-contrib/blob/main/instrumentation/nginx/README.md

where there are nginx variables that can be logged in the access log

  • opentelemetry_trace_id - Trace identifier of the current span.
  • opentelemetry_span_id - The span identifier of the current span.

@An-DJ
Copy link
Contributor

An-DJ commented Feb 1, 2023

@lework Currently that plugin does not define the nginx variables you mentioned to be used in log directly.

@An-DJ
Copy link
Contributor

An-DJ commented Feb 1, 2023

It seems that these variables are useful to debug and get to know the tracing details, which can be visited and recorded in logs or headers.

@lework Would you like to help the community to explore this?

@shreemaan-abhishek
Copy link
Contributor

fixed by #8871

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

No branches or pull requests

3 participants