starsz commented on code in PR #8871:
URL: https://github.com/apache/apisix/pull/8871#discussion_r1125794448
##########
docs/en/latest/plugins/opentelemetry.md:
##########
@@ -89,6 +89,32 @@ plugin_attr:
max_export_batch_size: 2
```
+## Variables
+
+The following nginx variables are set by OpenTelemetry:
+
+- `opentelemetry_context_traceparent` - [W3C trace
context](https://www.w3.org/TR/trace-context/#trace-context-http-headers-format),
e.g.: `00-0af7651916cd43dd8448eb211c80319c-b9c7c989f97918e1-01`
+- `opentelemetry_trace_id` - Trace Id of the current span
+- `opentelemetry_span_id` - Span Id of the current span
+
+How to use variables? you have to add it to your configuration file
(`conf/config.yaml`):
+
+```yaml title="./conf/config.yaml"
+ nginx_config:
+ http_server_configuration_snippet: |
+ set $opentelemetry_context_traceparent ""
+ set $opentelemetry_trace_id ""
+ set $opentelemetry_span_id ""
Review Comment:
I think there is another way, that if we enable `OpenTelemetry` we can add
`opentelemetry_span_id` automatically in `ngx_tpl.lua`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]