opentelemetry
The plugin currently only supports binary-encoded OTLP over HTTP. For details, see .
Then reload APISIX.
You can set the collecting by specifying the configuration in .
Name | Type | Default | Description |
---|---|---|---|
trace_id_source | enum | random | the source of trace id, the valid value is random or x-request-id . If is set, the value of x-request-id request header will be used as trace id. Please make sure it match regex pattern [0-9a-f]{32} |
resource | object | additional append to trace | |
collector | object | {address = “127.0.0.1:4318”, request_timeout = 3} | otlp collector |
collector.address | string | 127.0.0.1:4318 | collector address |
collector.request_timeout | integer | 3 | report request timeout(second) |
collector.request_headers | object | report request http headers | |
batch_span_processor | object | trace span processor | |
batch_span_processor.drop_on_queue_full | boolean | true | drop span when queue is full, otherwise force process batches |
batch_span_processor.max_queue_size | integer | 2048 | maximum queue size to buffer spans for delayed processing |
batch_span_processor.batch_timeout | number | 5 | maximum duration(second) for constructing a batch |
batch_span_processor.max_export_batch_size | integer | 256 | maximum number of spans to process in a single batch |
batch_span_processor.inactive_timeout | number | 2 | timer interval(second) for processing batches |
When you want to disable the opentelemetry plugin on a route/service, it is very simple, you can delete the corresponding JSON configuration in the plugin configuration, no need to restart the service, it will take effect immediately: