opentelemetry

    The Plugin only supports binary-encoded .

    You can set up the collector by configuring it in you configuration file (conf/config.yaml):

    NameTypeDefaultDescription
    trace_id_sourceenumrandomSource 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}.
    resourceobjectAdditional resource appended to the trace.
    collectorobject{address = “127.0.0.1:4318”, request_timeout = 3}OpenTelemetry Collector configuration.
    collector.addressstring127.0.0.1:4318Collector address.
    collector.request_timeoutinteger3Report request timeout in seconds.
    collector.request_headersobjectReport request HTTP headers.
    batch_span_processorobjectTrace span processor.
    batch_span_processor.drop_on_queue_fullbooleantrueWhen set to true, drops the span when queue is full. Otherwise, force process batches.
    batch_span_processor.max_queue_sizeinteger2048Maximum queue size for buffering spans for delayed processing.
    batch_span_processor.batch_timeoutnumber5Maximum time in seconds for constructing a batch.
    batch_span_processor.max_export_batch_sizeinteger256Maximum number of spans to process in a single batch.
    batch_span_processor.inactive_timeoutnumber2Time 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.