mirror of https://github.com/dapr/docs.git
Update doc to remove usage of exporter component (#995)
* Update doc to remove usage of exporter component * Outdated doc content/en/operations/troubleshooting/setup-tracing.md
This commit is contained in:
parent
f00e99bf4a
commit
7c1c70d89c
|
|
@ -29,7 +29,7 @@ Read [W3C distributed tracing]({{< ref w3c-tracing >}}) for more background on W
|
||||||
|
|
||||||
Dapr uses [probabilistic sampling](https://opencensus.io/tracing/sampling/probabilistic/) as defined by OpenCensus. The sample rate defines the probability a tracing span will be sampled and can have a value between 0 and 1 (inclusive). The deafault sample rate is 0.0001 (i.e. 1 in 10,000 spans is sampled).
|
Dapr uses [probabilistic sampling](https://opencensus.io/tracing/sampling/probabilistic/) as defined by OpenCensus. The sample rate defines the probability a tracing span will be sampled and can have a value between 0 and 1 (inclusive). The deafault sample rate is 0.0001 (i.e. 1 in 10,000 spans is sampled).
|
||||||
|
|
||||||
To change the default tracing behavior, use a configuration file (in self hosted mode) or a Kubernetes configuration object (in Kubernetes mode). For example, the following configuration object changes the sample rate to 1 (i.e. every span is sampled):
|
To change the default tracing behavior, use a configuration file (in self hosted mode) or a Kubernetes configuration object (in Kubernetes mode). For example, the following configuration object changes the sample rate to 1 (i.e. every span is sampled), and sends trace using Zipkin protocol to the Zipkin server at http://zipkin.default.svc.cluster.local
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: dapr.io/v1alpha1
|
apiVersion: dapr.io/v1alpha1
|
||||||
|
|
@ -40,30 +40,14 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
tracing:
|
tracing:
|
||||||
samplingRate: "1"
|
samplingRate: "1"
|
||||||
|
zipkin:
|
||||||
|
endpointAddress: "http://zipkin.default.svc.cluster.local:9411/api/v2/spans"
|
||||||
```
|
```
|
||||||
|
|
||||||
Similarly, changing `samplingRate` to 0 will disable tracing altogether.
|
Changing `samplingRate` to 0 will disable tracing altogether.
|
||||||
|
|
||||||
See the [References](#references) section for more details on how to configure tracing on local environment and Kubernetes environment.
|
See the [References](#references) section for more details on how to configure tracing on local environment and Kubernetes environment.
|
||||||
|
|
||||||
Dapr supports pluggable exporters, defined by configuration files (in self hosted mode) or a Kubernetes custom resource object (in Kubernetes mode). For example, the following manifest defines a Zipkin exporter:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: dapr.io/v1alpha1
|
|
||||||
kind: Component
|
|
||||||
metadata:
|
|
||||||
name: zipkin
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
type: exporters.zipkin
|
|
||||||
version: v1
|
|
||||||
metadata:
|
|
||||||
- name: enabled
|
|
||||||
value: "true"
|
|
||||||
- name: exporterAddress
|
|
||||||
value: "http://zipkin.default.svc.cluster.local:9411/api/v2/spans"
|
|
||||||
```
|
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
- [How-To: Setup Application Insights for distributed tracing with OpenTelemetry Collector]({{< ref open-telemetry-collector.md >}})
|
- [How-To: Setup Application Insights for distributed tracing with OpenTelemetry Collector]({{< ref open-telemetry-collector.md >}})
|
||||||
|
|
|
||||||
|
|
@ -28,30 +28,29 @@ docker run -d --name jaeger \
|
||||||
|
|
||||||
Next, create the following YAML files locally:
|
Next, create the following YAML files locally:
|
||||||
|
|
||||||
* **jaeger.yaml**: Note that because we are using the Zipkin protocol to talk to Jaeger,
|
* **config.yaml**: Note that because we are using the Zipkin protocol
|
||||||
the type of the exporter in the YAML file below is `exporter.zipkin`,
|
to talk to Jaeger, we specify the `zipkin` section of tracing
|
||||||
while the `exporterAddress` is the address of the Jaeger instance.
|
configuration set the `endpointAddress` to address of the Jaeger
|
||||||
|
instance.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: dapr.io/v1alpha1
|
apiVersion: dapr.io/v1alpha1
|
||||||
kind: Component
|
kind: Configuration
|
||||||
metadata:
|
metadata:
|
||||||
name: zipkin
|
name: tracing
|
||||||
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
type: exporters.zipkin
|
tracing:
|
||||||
metadata:
|
samplingRate: "1"
|
||||||
- name: enabled
|
zipkin:
|
||||||
value: "true"
|
endpointAddress: "http://localhost:9412/api/v2/spans"
|
||||||
- name: exporterAddress
|
|
||||||
value: "http://localhost:9412/api/v2/spans"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
To launch the application referring to the new YAML file, you can use
|
To launch the application referring to the new YAML file, you can use
|
||||||
`--components-path`. Assuming that, the **jaeger.yaml** file is in the
|
`--config` option:
|
||||||
current directory, you can use
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dapr run --app-id mynode --app-port 3000 node app.js --components-path .
|
dapr run --app-id mynode --app-port 3000 node app.js --config config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Viewing Traces
|
### Viewing Traces
|
||||||
|
|
@ -92,26 +91,7 @@ kubectl apply -f jaeger-operator.yaml
|
||||||
kubectl wait deploy --selector app.kubernetes.io/name=jaeger --for=condition=available
|
kubectl wait deploy --selector app.kubernetes.io/name=jaeger --for=condition=available
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, create the following YAML files locally:
|
Next, create the following YAML file locally:
|
||||||
|
|
||||||
* **jaeger.yaml**: Note that because we are using the Zipkin protocol to talk to Jaeger,
|
|
||||||
the type of the exporter in the YAML file below is `exporter.zipkin`,
|
|
||||||
while the `exporterAddress` is the address of the Jaeger instance.
|
|
||||||
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: dapr.io/v1alpha1
|
|
||||||
kind: Component
|
|
||||||
metadata:
|
|
||||||
name: zipkin
|
|
||||||
spec:
|
|
||||||
type: exporters.zipkin
|
|
||||||
metadata:
|
|
||||||
- name: enabled
|
|
||||||
value: "true"
|
|
||||||
- name: exporterAddress
|
|
||||||
value: "http://jaeger-collector.default.svc.cluster.local:9411/api/v2/spans"
|
|
||||||
```
|
|
||||||
|
|
||||||
* **tracing.yaml**
|
* **tracing.yaml**
|
||||||
|
|
||||||
|
|
@ -124,13 +104,14 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
tracing:
|
tracing:
|
||||||
samplingRate: "1"
|
samplingRate: "1"
|
||||||
|
zipkin:
|
||||||
|
endpointAddress: "http://jaeger-collector.default.svc.cluster.local:9411/api/v2/spans"
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, deploy the the Dapr component and configuration files:
|
Finally, deploy the the Dapr component and configuration files:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl apply -f tracing.yaml
|
kubectl apply -f tracing.yaml
|
||||||
kubectl apply -f jaeger.yaml
|
|
||||||
```
|
```
|
||||||
|
|
||||||
In order to enable this configuration for your Dapr sidecar, add the following annotation to your pod spec template:
|
In order to enable this configuration for your Dapr sidecar, add the following annotation to your pod spec template:
|
||||||
|
|
|
||||||
|
|
@ -10,25 +10,23 @@ description: "Set-up New Relic for Dapr observability"
|
||||||
|
|
||||||
- Perpetually [free New Relic account](https://newrelic.com/signup), 100 GB/month of free data ingest, 1 free full access user, unlimited free basic users
|
- Perpetually [free New Relic account](https://newrelic.com/signup), 100 GB/month of free data ingest, 1 free full access user, unlimited free basic users
|
||||||
|
|
||||||
## Configure Zipkin Exporter
|
## Configure Dapr tracing
|
||||||
|
|
||||||
Dapr natively captures metrics and traces that can be send directly to New Relic. The easiest way to export these is by providing a Zipkin exporter configured to send the traces to [New Relic's Trace API](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/report-zipkin-format-traces-trace-api#existing-zipkin).
|
Dapr natively captures metrics and traces that can be send directly to New Relic. The easiest way to export these is by configuring Dapr to send the traces to [New Relic's Trace API](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/trace-api/report-zipkin-format-traces-trace-api#existing-zipkin) using the Zipkin trace format.
|
||||||
|
|
||||||
In order for the integration to send data to New Relic [Telemetry Data Platform](https://newrelic.com/platform/telemetry-data-platform), you need a [New Relic Insights Insert API key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#insights-insert-key).
|
In order for the integration to send data to New Relic [Telemetry Data Platform](https://newrelic.com/platform/telemetry-data-platform), you need a [New Relic Insights Insert API key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#insights-insert-key).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: dapr.io/v1alpha1
|
apiVersion: dapr.io/v1alpha1
|
||||||
kind: Component
|
kind: Configuration
|
||||||
metadata:
|
metadata:
|
||||||
name: zipkin
|
name: appconfig
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
type: exporters.zipkin
|
tracing:
|
||||||
metadata:
|
samplingRate: "1"
|
||||||
- name: enabled
|
zipkin:
|
||||||
value: "true"
|
endpointAddress: "https://trace-api.newrelic.com/trace/v1?Api-Key=<NR-INSIGHTS-INSERT-API-KEY>&Data-Format=zipkin&Data-Format-Version=2"
|
||||||
- name: exporterAddress
|
|
||||||
value: "https://trace-api.newrelic.com/trace/v1?Api-Key=<NR-INSIGHTS-INSERT-API-KEY>&Data-Format=zipkin&Data-Format-Version=2"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Viewing Traces
|
### Viewing Traces
|
||||||
|
|
|
||||||
|
|
@ -9,28 +9,9 @@ type: docs
|
||||||
|
|
||||||
## Configure self hosted mode
|
## Configure self hosted mode
|
||||||
|
|
||||||
For self hosted mode, on running `dapr init` the following YAML files are created by default and they are referenced by default on `dapr run` calls unless otherwise overridden.
|
For self hosted mode, on running `dapr init`:
|
||||||
|
|
||||||
1. The following file in `$HOME/dapr/components/zipkin.yaml` or `%USERPROFILE%\dapr\components\zipkin.yaml`:
|
1. The following YAML file is created by default in `$HOME/dapr/config.yaml` (on Linux/Mac) or `%USERPROFILE%\dapr\config.yaml` (on Windows) and it is referenced by default on `dapr run` calls unless otherwise overridden `:
|
||||||
|
|
||||||
* zipkin.yaml
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: dapr.io/v1alpha1
|
|
||||||
kind: Component
|
|
||||||
metadata:
|
|
||||||
name: zipkin
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
type: exporters.zipkin
|
|
||||||
version: v1
|
|
||||||
metadata:
|
|
||||||
- name: enabled
|
|
||||||
value: "true"
|
|
||||||
- name: exporterAddress
|
|
||||||
value: "http://localhost:9411/api/v2/spans"
|
|
||||||
```
|
|
||||||
2. The following file in `$HOME/dapr/config.yaml` or `%USERPROFILE%\dapr\config.yaml`:
|
|
||||||
|
|
||||||
* config.yaml
|
* config.yaml
|
||||||
|
|
||||||
|
|
@ -43,9 +24,11 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
tracing:
|
tracing:
|
||||||
samplingRate: "1"
|
samplingRate: "1"
|
||||||
|
zipkin:
|
||||||
|
endpointAddress: "http://localhost:9411/api/v2/spans"
|
||||||
```
|
```
|
||||||
|
|
||||||
3. The [openzipkin/zipkin](https://hub.docker.com/r/openzipkin/zipkin/) docker container is launched on running `dapr init` or it can be launched with the following code.
|
2. The [openzipkin/zipkin](https://hub.docker.com/r/openzipkin/zipkin/) docker container is launched on running `dapr init` or it can be launched with the following code.
|
||||||
|
|
||||||
Launch Zipkin using Docker:
|
Launch Zipkin using Docker:
|
||||||
|
|
||||||
|
|
@ -53,7 +36,7 @@ Launch Zipkin using Docker:
|
||||||
docker run -d -p 9411:9411 openzipkin/zipkin
|
docker run -d -p 9411:9411 openzipkin/zipkin
|
||||||
```
|
```
|
||||||
|
|
||||||
4. The applications launched with `dapr run` will by default reference the config file in `$HOME/dapr/config.yaml` or `%USERPROFILE%\dapr\config.yaml` and can be overridden with the Dapr CLI using the `--config` param:
|
3. The applications launched with `dapr run` will by default reference the config file in `$HOME/dapr/config.yaml` or `%USERPROFILE%\dapr\config.yaml` and can be overridden with the Dapr CLI using the `--config` param:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dapr run --app-id mynode --app-port 3000 node app.js
|
dapr run --app-id mynode --app-port 3000 node app.js
|
||||||
|
|
@ -79,25 +62,7 @@ Create a Kubernetes service for the Zipkin pod:
|
||||||
kubectl expose deployment zipkin --type ClusterIP --port 9411
|
kubectl expose deployment zipkin --type ClusterIP --port 9411
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, create the following YAML files locally:
|
Next, create the following YAML file locally:
|
||||||
|
|
||||||
* zipkin.yaml component
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: dapr.io/v1alpha1
|
|
||||||
kind: Component
|
|
||||||
metadata:
|
|
||||||
name: zipkin
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
type: exporters.zipkin
|
|
||||||
version: v1
|
|
||||||
metadata:
|
|
||||||
- name: enabled
|
|
||||||
value: "true"
|
|
||||||
- name: exporterAddress
|
|
||||||
value: "http://zipkin.default.svc.cluster.local:9411/api/v2/spans"
|
|
||||||
```
|
|
||||||
|
|
||||||
* tracing.yaml configuration
|
* tracing.yaml configuration
|
||||||
|
|
||||||
|
|
@ -110,13 +75,14 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
tracing:
|
tracing:
|
||||||
samplingRate: "1"
|
samplingRate: "1"
|
||||||
|
zipkin:
|
||||||
|
endpointAddress: "http://zipkin.default.svc.cluster.local:9411/api/v2/spans"
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, deploy the the Dapr component and configuration files:
|
Now, deploy the the Dapr configuration file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl apply -f tracing.yaml
|
kubectl apply -f tracing.yaml
|
||||||
kubectl apply -f zipkin.yaml
|
|
||||||
```
|
```
|
||||||
|
|
||||||
In order to enable this configuration for your Dapr sidecar, add the following annotation to your pod spec template:
|
In order to enable this configuration for your Dapr sidecar, add the following annotation to your pod spec template:
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ weight: 3000
|
||||||
description: "Configure Dapr to send distributed tracing data"
|
description: "Configure Dapr to send distributed tracing data"
|
||||||
---
|
---
|
||||||
|
|
||||||
Dapr integrates with Open Census for telemetry and tracing.
|
|
||||||
|
|
||||||
It is recommended to run Dapr with tracing enabled for any production scenario.
|
It is recommended to run Dapr with tracing enabled for any production scenario.
|
||||||
Since Dapr uses Open Census, you can configure various exporters for tracing and telemetry data based on your environment, whether it is running in the cloud or on-premises.
|
Since Dapr uses Open Census, you can configure various exporters for tracing and telemetry data based on your environment, whether it is running in the cloud or on-premises.
|
||||||
|
|
||||||
|
|
@ -17,22 +15,18 @@ The `tracing` section under the `Configuration` spec contains the following prop
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
tracing:
|
tracing:
|
||||||
enabled: true
|
tracing:
|
||||||
exporterType: zipkin
|
samplingRate: "1"
|
||||||
exporterAddress: ""
|
zipkin:
|
||||||
expandParams: true
|
endpointAddress: "https://..."
|
||||||
includeBody: true
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The following table lists the different properties.
|
The following table lists the properties for tracing:
|
||||||
|
|
||||||
| Property | Type | Description |
|
| Property | Type | Description |
|
||||||
|----------|------|-------------|
|
|--------------|--------|-------------|
|
||||||
| enabled | bool | Set tracing to be enabled or disabled
|
| `samplingRate` | string | Set sampling rate for tracing to be enabled or disabled.
|
||||||
| exporterType | string | Name of the Open Census exporter to use. For example: Zipkin, Azure Monitor, etc
|
| `zipkin.endpointAddress` | string | Set the Zipkin server address.
|
||||||
| exporterAddress | string | URL of the exporter
|
|
||||||
| expandParams | bool | When true, expands parameters passed to HTTP endpoints
|
|
||||||
| includeBody | bool | When true, includes the request body in the tracing event
|
|
||||||
|
|
||||||
|
|
||||||
## Zipkin in stand-alone mode
|
## Zipkin in stand-alone mode
|
||||||
|
|
@ -51,11 +45,9 @@ For Standalone mode, create a Dapr configuration file locally and reference it w
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
tracing:
|
tracing:
|
||||||
enabled: true
|
samplingRate: "1"
|
||||||
exporterType: zipkin
|
zipkin:
|
||||||
exporterAddress: "http://localhost:9411/api/v2/spans"
|
endpointAddress: "http://localhost:9411/api/v2/spans"
|
||||||
expandParams: true
|
|
||||||
includeBody: true
|
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Launch Zipkin using Docker:
|
2. Launch Zipkin using Docker:
|
||||||
|
|
@ -99,11 +91,9 @@ metadata:
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
tracing:
|
tracing:
|
||||||
enabled: true
|
samplingRate: "1"
|
||||||
exporterType: zipkin
|
zipkin:
|
||||||
exporterAddress: "http://zipkin.default.svc.cluster.local:9411/api/v2/spans"
|
endpointAddress: "http://zipkin.default.svc.cluster.local:9411/api/v2/spans"
|
||||||
expandParams: true
|
|
||||||
includeBody: true
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, deploy the Dapr configuration:
|
Finally, deploy the Dapr configuration:
|
||||||
|
|
|
||||||
|
|
@ -92,11 +92,6 @@ curl http://localhost:3500/v1.0/metadata
|
||||||
"name":"statestore",
|
"name":"statestore",
|
||||||
"type":"state.redis",
|
"type":"state.redis",
|
||||||
"version":""
|
"version":""
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"zipkin",
|
|
||||||
"type":"exporters.zipkin",
|
|
||||||
"version":""
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -177,11 +172,6 @@ Get the metadata information to confirm your custom attribute was added:
|
||||||
"name":"statestore",
|
"name":"statestore",
|
||||||
"type":"state.redis",
|
"type":"state.redis",
|
||||||
"version":""
|
"version":""
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"zipkin",
|
|
||||||
"type":"exporters.zipkin",
|
|
||||||
"version":""
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue