Parameters
See plugin common configurations for configuration options available to all plugins.
sampler
Sampling configuration.
name
vaild vaule:
always_on,always_off,trace_id_ratio, orparent_baseSampling strategy.
To always sample, use
always_on.To never sample, use
always_off.To randomly sample based on a given ratio, use
trace_id_ratio.To use to sampling decision of the span’s parent, use
parent_base. If there is no parent, use the root sampler.options
Parameters for sampling strategy.
fraction
vaild vaule:
between 0 and 1 inclusive
Sampling ratio when the sampling strategy is
trace_id_ratio.root
Root sampler when the sampling strategy is
parent_basestrategy.name
vaild vaule:
always_on,always_off, ortrace_id_ratioRoot sampling strategy.
options
Root sampling strategy parameters.
fraction
vaild vaule:
between 0 and 1 inclusive
Root sampling ratio when the sampling strategy is
trace_id_ratio.
additional_attributes
Names of built-in variables to append to the trace span as string attributes. Values are resolved in the log phase, so variables populated late in request processing are available. Numeric and boolean values are converted to strings; boolean
falseis retained.additional_header_prefix_attributes
Headers or header prefixes appended to the trace span as string attributes in the log phase. For example, use
x-my-headerorx-my-headers-*to include all headers with the prefixx-my-headers-. Multiple values for one header are joined with,.
Plugin Metadata
tracing
Global flag to enable or disable tracing. When set to
false, no spans will be emitted regardless of per-route sampler configuration.trace_id_source
vaild vaule:
x-request-idorrandomSource of the trace ID. When set to
x-request-id, the value of thex-request-idheader will be used as the trace ID.resource
Additional resource to append to the trace, for example,
{"service_name": "APISIX"}.collector
Collector configurations.
address
Address of the OpenTelemetry collector to send traces to.
request_timeout
Request timeout to OpenTelemetry collector in seconds.
request_headers
Request header to include in requests to OpenTelemetry collector, such as
{"Authorization": "token"}.
batch_span_processor
Batch span processor configurations.
drop_on_queue_full
If true, drop span when the queue is full, otherwise force process batches.
max_queue_size
Maximum queue size to buffer spans for delayed processing.
batch_timeout
Timeout for span batches to wait in the export queue before being sent, in seconds.
inactive_timeout
Timeout for spans to wait in the export queue before being sent, if the queue is not full, in seconds.
max_export_batch_size
Maximum number of spans to include in a single batch sent to the OpenTelemetry collector.
set_ngx_var
Export
opentelemetryvariables to built-in variables.