Skip to main content

Parameters

See plugin common configurations for configuration options available to all plugins.

  • sampler

    object


    Sampling configuration.

    • name

      string


      default: always_off


      vaild vaule:

      always_on, always_off, trace_id_ratio, or parent_base


      Sampling 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

      object


      Parameters for sampling strategy.

      • fraction

        number


        default: 0


        vaild vaule:

        between 0 and 1 inclusive


        Sampling ratio when the sampling strategy is trace_id_ratio.

      • root

        object


        Root sampler when the sampling strategy is parent_base strategy.

        • name

          string


          vaild vaule:

          always_on, always_off, or trace_id_ratio


          Root sampling strategy.

        • options

          object


          Root sampling strategy parameters.

          • fraction

            number


            default: 0


            vaild vaule:

            between 0 and 1 inclusive


            Root sampling ratio when the sampling strategy is trace_id_ratio.

  • additional_attributes

    array[string]


    Additional attributes appended to the trace span. Support built-in variables in values.

  • additional_header_prefix_attributes

    array[string]


    Headers or header prefixes appended to the trace span's attributes. For example, use x-my-header" or x-my-headers-* to include all headers with the prefix x-my-headers-.

Plugin Metadata

  • trace_id_source

    string


    default: random


    vaild vaule:

    x-request-id or random


    Source of the trace ID. When set to x-request-id, the value of the x-request-id header will be used as the trace ID.

  • resource

    object


    Additional resource to append to the trace, for example, {"service_name": "APISIX"}.

  • collector

    object


    Collector configurations.

    • address

      string


      default: 127.0.0.1:4318


      Address of the OpenTelemetry collector to send traces to.

    • request_timeout

      integer


      default: 3


      Request timeout to OpenTelemetry collector in seconds.

    • request_headers

      object


      Request header to include in requests to OpenTelemetry collector, such as {"Authorization": "token"}.

  • batch_span_processor

    object


    Batch span processor configurations.

    • drop_on_queue_full

      boolean


      If true, drop span when the queue is full, otherwise force process batches.

    • max_queue_size

      integer


      Maximum queue size to buffer spans for delayed processing.

    • batch_timeout

      number


      Timeout for span batches to wait in the export queue before being sent, in seconds.

    • inactive_timeout

      number


      Timeout for spans to wait in the export queue before being sent, if the queue is not full, in seconds.

    • max_export_batch_size

      integer


      Maximum number of spans to include in a single batch sent to the OpenTelemetry collector.

  • set_ngx_var

    object


    Export opentelemetry variables to built-in variables.

API7.ai Logo

The digital world is connected by APIs,
API7.ai exists to make APIs more efficient, reliable, and secure.

Sign up for API7 newsletter

Product

API7 Gateway

SOC2 Type IIISO 27001HIPAAGDPRRed Herring

Copyright © APISEVEN PTE. LTD 2019 – 2025. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the Apache Software Foundation