opentelemetry
The Plugin only supports binary-encoded .
You can set up the collector by configuring it in you configuration file (conf/config.yaml
):
Name | Type | Default | Description |
---|---|---|---|
trace_id_source | enum | random | Source of the trace ID. Valid values are or x-request-id . When set to x-request-id , the value of the x-request-id header will be used as trace ID. Make sure that is matches the regex pattern [0-9a-f]{32} . |
resource | object | Additional resource appended to the trace. | |
collector | object | {address = “127.0.0.1:4318”, request_timeout = 3} | OpenTelemetry Collector configuration. |
collector.address | string | 127.0.0.1:4318 | Collector address. |
collector.request_timeout | integer | 3 | Report request timeout in seconds. |
collector.request_headers | object | Report request HTTP headers. | |
batch_span_processor | object | Trace span processor. | |
batch_span_processor.drop_on_queue_full | boolean | true | When set to true , drops the span when queue is full. Otherwise, force process batches. |
batch_span_processor.max_queue_size | integer | 2048 | Maximum queue size for buffering spans for delayed processing. |
batch_span_processor.batch_timeout | number | 5 | Maximum time in seconds 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 | Time interval in seconds between processing batches. |
conf/config.yaml
To enable the Plugin, you have to add it to your configuration file (conf/config.yaml
):
Now, you can enable the Plugin on a specific Route:
To disable the Plugin, you can delete the corresponding JSON configuration from the Plugin configuration. APISIX will automatically reload and you do not have to restart for this to take effect.