# Zipkin Configuration

The `zipkin` plugin instruments the API gateway to send traces to Zipkin or compatible collectors like Jaeger and Apache SkyWalking, enhancing request tracing capabilities.<!-- --> <!-- -->Configuration covers static settings and plugin parameters.

## Static Configurations[​](#static-configurations "Direct link to Static Configurations")

The `zipkin` plugin does not populate its NGINX variables by default. Enable them when logger plugins or access logs need the current request's trace identifiers.

The file to update depends on how the gateway is deployed:

* Host or Docker
* Kubernetes (Helm)

For host or Docker deployments, configure the following settings:

config.yaml

```
plugin_attr:

  zipkin:

    set_ngx_var: true
```

Then reload the gateway for changes to take effect.

For Helm deployments, update the chart values that render `plugin_attr.zipkin`. Keep the rest of your values file unchanged.

For the APISIX Helm chart, set the following values:

values.yaml

```
apisix:

  pluginAttrs:

    zipkin:

      set_ngx_var: true
```

For the API7 Gateway Helm chart, set the following values:

values.yaml

```
pluginAttrs:

  zipkin:

    set_ngx_var: true
```

Then apply the values file with the chart used for this gateway release. Replace `<chart-version>` with the version used by the installed release:

```
helm upgrade <release-name> <chart-name> \

  --version <chart-version> \

  -n <namespace> \

  -f values.yaml
```

## Parameters[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

* endpoint

  string

  required

  ***

  Zipkin v2 HTTP endpoint to which the plugin sends spans, such as `http://zipkin:9411/api/v2/spans`.

* sample\_ratio

  number

  required

  valid value:

  between 0.00001 and 1 inclusive

  ***

  Frequency to sample requests. Setting to 1 means sampling every request.

* service\_name

  string

  default: `APISIX`

  ***

  Service name for the Zipkin reporter to be displayed in Zipkin.

* server\_addr

  string

  default: `the value of $server_addr`

  valid value:

  IPv4 address

  ***

  IPv4 address for the Zipkin reporter. For example, you can set this to your external IP address.

* span\_version

  integer

  default: `2`

  valid value:

  1 or 2

  ***

  Gateway span hierarchy to generate. This setting does not change the Zipkin v2 wire format.
