# SkyWalking Configuration

The `skywalking` plugin sends APISIX and API7 Gateway request traces to Apache SkyWalking for distributed tracing, request analysis, and trace-log correlation.<!-- --> <!-- -->Configuration covers static settings and plugin parameters.

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

By default, service names and endpoint address for the plugin are pre-configured in the [default configuration](https://github.com/apache/apisix/blob/master/apisix/cli/config.lua).

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:

  skywalking:

    report_interval: 3      # Reporting interval time in seconds.

    service_name: APISIX    # Service name for SkyWalking reporter.

    service_instance_name: "APISIX Instance Name"   # Service instance name for SkyWalking reporter.

                                                    # Set to $hostname to get the local hostname.

    endpoint_addr: http://127.0.0.1:12800           # SkyWalking HTTP endpoint.
```

Then reload the gateway for changes to take effect.

For Helm deployments, update the chart values that render `plugin_attr.skywalking`. For APISIX, also confirm that the plugin is loaded in the gateway plugin list before applying them. Keep the rest of your values file unchanged.

For the APISIX Helm chart, set the following values:

values.yaml

```
apisix:

  pluginAttrs:

    skywalking:

      report_interval: 3

      service_name: APISIX

      service_instance_name: "APISIX Instance Name"

      endpoint_addr: http://127.0.0.1:12800
```

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

values.yaml

```
pluginAttrs:

  skywalking:

    report_interval: 3

    service_name: APISIX

    service_instance_name: "APISIX Instance Name"

    endpoint_addr: http://127.0.0.1:12800
```

Then apply the values file with the chart used for this gateway release:

```
helm upgrade <release-name> <chart-name> -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.

* sample\_ratio

  number

  default: `1`

  valid value:

  between 0.00001 and 1 inclusive

  ***

  Frequency of request sampling. Setting the sample ratio to `1` means to sample all requests.
