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).
|
||||
|
||||
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
|
||||
apiVersion: dapr.io/v1alpha1
|
||||
|
@ -40,30 +40,14 @@ metadata:
|
|||
spec:
|
||||
tracing:
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
- [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:
|
||||
|
||||
* **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.
|
||||
* **config.yaml**: Note that because we are using the Zipkin protocol
|
||||
to talk to Jaeger, we specify the `zipkin` section of tracing
|
||||
configuration set the `endpointAddress` to address of the Jaeger
|
||||
instance.
|
||||
|
||||
```yaml
|
||||
apiVersion: dapr.io/v1alpha1
|
||||
kind: Component
|
||||
kind: Configuration
|
||||
metadata:
|
||||
name: zipkin
|
||||
name: tracing
|
||||
namespace: default
|
||||
spec:
|
||||
type: exporters.zipkin
|
||||
metadata:
|
||||
- name: enabled
|
||||
value: "true"
|
||||
- name: exporterAddress
|
||||
value: "http://localhost:9412/api/v2/spans"
|
||||
tracing:
|
||||
samplingRate: "1"
|
||||
zipkin:
|
||||
endpointAddress: "http://localhost:9412/api/v2/spans"
|
||||
```
|
||||
|
||||
To launch the application referring to the new YAML file, you can use
|
||||
`--components-path`. Assuming that, the **jaeger.yaml** file is in the
|
||||
current directory, you can use
|
||||
`--config` option:
|
||||
|
||||
```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
|
||||
|
@ -92,26 +91,7 @@ kubectl apply -f jaeger-operator.yaml
|
|||
kubectl wait deploy --selector app.kubernetes.io/name=jaeger --for=condition=available
|
||||
```
|
||||
|
||||
Next, create the following YAML files 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"
|
||||
```
|
||||
Next, create the following YAML file locally:
|
||||
|
||||
* **tracing.yaml**
|
||||
|
||||
|
@ -124,13 +104,14 @@ metadata:
|
|||
spec:
|
||||
tracing:
|
||||
samplingRate: "1"
|
||||
zipkin:
|
||||
endpointAddress: "http://jaeger-collector.default.svc.cluster.local:9411/api/v2/spans"
|
||||
```
|
||||
|
||||
Finally, deploy the the Dapr component and configuration files:
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
|
|
@ -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
|
||||
|
||||
## 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).
|
||||
|
||||
```yaml
|
||||
apiVersion: dapr.io/v1alpha1
|
||||
kind: Component
|
||||
kind: Configuration
|
||||
metadata:
|
||||
name: zipkin
|
||||
name: appconfig
|
||||
namespace: default
|
||||
spec:
|
||||
type: exporters.zipkin
|
||||
metadata:
|
||||
- name: enabled
|
||||
value: "true"
|
||||
- name: exporterAddress
|
||||
value: "https://trace-api.newrelic.com/trace/v1?Api-Key=<NR-INSIGHTS-INSERT-API-KEY>&Data-Format=zipkin&Data-Format-Version=2"
|
||||
tracing:
|
||||
samplingRate: "1"
|
||||
zipkin:
|
||||
endpointAddress: "https://trace-api.newrelic.com/trace/v1?Api-Key=<NR-INSIGHTS-INSERT-API-KEY>&Data-Format=zipkin&Data-Format-Version=2"
|
||||
```
|
||||
|
||||
### Viewing Traces
|
||||
|
@ -114,4 +112,4 @@ All the data that is collected from Dapr, Kubernetes or any services that run on
|
|||
* [New Relic Metric API](https://docs.newrelic.com/docs/telemetry-data-platform/get-data/apis/introduction-metric-api)
|
||||
* [Types of New Relic API keys](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys)
|
||||
* [New Relic OpenTelemetry User Experience](https://blog.newrelic.com/product-news/opentelemetry-user-experience/)
|
||||
* [Alerts and Applied Intelligence](https://docs.newrelic.com/docs/alerts-applied-intelligence)
|
||||
* [Alerts and Applied Intelligence](https://docs.newrelic.com/docs/alerts-applied-intelligence)
|
||||
|
|
|
@ -9,28 +9,9 @@ type: docs
|
|||
|
||||
## 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`:
|
||||
|
||||
* 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`:
|
||||
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 `:
|
||||
|
||||
* config.yaml
|
||||
|
||||
|
@ -43,9 +24,11 @@ metadata:
|
|||
spec:
|
||||
tracing:
|
||||
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:
|
||||
|
||||
|
@ -53,7 +36,7 @@ Launch Zipkin using Docker:
|
|||
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
|
||||
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
|
||||
```
|
||||
|
||||
Next, create the following YAML files 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"
|
||||
```
|
||||
Next, create the following YAML file locally:
|
||||
|
||||
* tracing.yaml configuration
|
||||
|
||||
|
@ -110,13 +75,14 @@ metadata:
|
|||
spec:
|
||||
tracing:
|
||||
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
|
||||
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:
|
||||
|
|
|
@ -6,8 +6,6 @@ weight: 3000
|
|||
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.
|
||||
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
|
||||
tracing:
|
||||
enabled: true
|
||||
exporterType: zipkin
|
||||
exporterAddress: ""
|
||||
expandParams: true
|
||||
includeBody: true
|
||||
tracing:
|
||||
samplingRate: "1"
|
||||
zipkin:
|
||||
endpointAddress: "https://..."
|
||||
```
|
||||
|
||||
The following table lists the different properties.
|
||||
The following table lists the properties for tracing:
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| enabled | bool | Set tracing to be enabled or disabled
|
||||
| exporterType | string | Name of the Open Census exporter to use. For example: Zipkin, Azure Monitor, etc
|
||||
| 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
|
||||
| Property | Type | Description |
|
||||
|--------------|--------|-------------|
|
||||
| `samplingRate` | string | Set sampling rate for tracing to be enabled or disabled.
|
||||
| `zipkin.endpointAddress` | string | Set the Zipkin server address.
|
||||
|
||||
|
||||
## Zipkin in stand-alone mode
|
||||
|
@ -51,11 +45,9 @@ For Standalone mode, create a Dapr configuration file locally and reference it w
|
|||
namespace: default
|
||||
spec:
|
||||
tracing:
|
||||
enabled: true
|
||||
exporterType: zipkin
|
||||
exporterAddress: "http://localhost:9411/api/v2/spans"
|
||||
expandParams: true
|
||||
includeBody: true
|
||||
samplingRate: "1"
|
||||
zipkin:
|
||||
endpointAddress: "http://localhost:9411/api/v2/spans"
|
||||
```
|
||||
|
||||
2. Launch Zipkin using Docker:
|
||||
|
@ -99,11 +91,9 @@ metadata:
|
|||
namespace: default
|
||||
spec:
|
||||
tracing:
|
||||
enabled: true
|
||||
exporterType: zipkin
|
||||
exporterAddress: "http://zipkin.default.svc.cluster.local:9411/api/v2/spans"
|
||||
expandParams: true
|
||||
includeBody: true
|
||||
samplingRate: "1"
|
||||
zipkin:
|
||||
endpointAddress: "http://zipkin.default.svc.cluster.local:9411/api/v2/spans"
|
||||
```
|
||||
|
||||
Finally, deploy the Dapr configuration:
|
||||
|
|
|
@ -92,11 +92,6 @@ curl http://localhost:3500/v1.0/metadata
|
|||
"name":"statestore",
|
||||
"type":"state.redis",
|
||||
"version":""
|
||||
},
|
||||
{
|
||||
"name":"zipkin",
|
||||
"type":"exporters.zipkin",
|
||||
"version":""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -177,11 +172,6 @@ Get the metadata information to confirm your custom attribute was added:
|
|||
"name":"statestore",
|
||||
"type":"state.redis",
|
||||
"version":""
|
||||
},
|
||||
{
|
||||
"name":"zipkin",
|
||||
"type":"exporters.zipkin",
|
||||
"version":""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue