You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector-appinsights.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -6,42 +6,42 @@ weight: 1000
6
6
description: "How to push trace events to Azure Application Insights, using the OpenTelemetry Collector."
7
7
---
8
8
9
-
Dapr integrates with [OpenTelemetry (OTEL) Collector](https://github.com/open-telemetry/opentelemetry-collector) using the Zipkin API. This guide walks through an example using Dapr to push trace events to Azure Application Insights, using the OpenTelemetry Collector.
9
+
Dapr integrates with [OpenTelemetry (OTEL) Collector](https://github.com/open-telemetry/opentelemetry-collector) using the OpenTelemetry protocol (OTLP). This guide walks through an example using Dapr to push traces to Azure Application Insights, using the OpenTelemetry Collector.
10
10
11
11
## Prerequisites
12
12
13
13
-[Install Dapr on Kubernetes]({{< ref kubernetes >}})
14
-
-[Set up an App Insights resource](https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource) and make note of your App Insights connection string.
14
+
-[Create an Application Insights resource](https://learn.microsoft.com/azure/azure-monitor/app/create-workspace-resource) and make note of your Application Insights connection string.
15
15
16
16
## Set up OTEL Collector to push to your App Insights instance
17
17
18
-
To push events to your App Insights instance, install the OTEL Collector to your Kubernetes cluster.
18
+
To push traces to your Application Insights instance, install the OpenTelemetry Collector on your Kubernetes cluster.
19
19
20
-
1.Check out the [`open-telemetry-collector-appinsights.yaml`](/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml) file.
20
+
1.Download and inspect the [`open-telemetry-collector-appinsights.yaml`](/docs/open-telemetry-collector/open-telemetry-collector-appinsights.yaml) file.
21
21
22
22
1. Replace the `<CONNECTION_STRING>` placeholder with your App Insights connection string.
23
23
24
-
1.Apply the configuration with:
24
+
1.Deploy the OpenTelemetry Collector into the same namespace where your Dapr-enabled applications are running:
## Set up Dapr to send traces to the OpenTelemetry Collector
31
31
32
-
Set up a Dapr configuration file to turn on tracing and deploy a tracing exporter component that uses the OpenTelemetry Collector.
32
+
Create a Dapr configuration file to enable tracing and send traces to the OpenTelemetry Collector via [OTLP](https://opentelemetry.io/docs/specs/otel/protocol/).
33
33
34
-
1.Use this [`collector-config.yaml`](/docs/open-telemetry-collector/collector-config.yaml) file to create your own configuration.
34
+
1.Download and inspect the [`collector-config-otel.yaml`](/docs/open-telemetry-collector/collector-config-otel.yaml). Update the `namespace` and `otel.endpointAddress` values to align with the namespace where your Dapr-enabled applications and OpenTelemetry Collector are deployed.
35
35
36
-
1. Apply the configuration with:
36
+
1. Apply the configuration with:
37
37
38
38
```sh
39
-
kubectl apply -f collector-config.yaml
39
+
kubectl apply -f collector-config-otel.yaml
40
40
```
41
41
42
42
## Deploy your app with tracing
43
43
44
-
Apply the `appconfig` configuration by adding a `dapr.io/config` annotation to the container that you want to participate in the distributed tracing, as shown in the following example:
44
+
Apply the `tracing` configuration by adding a `dapr.io/config` annotation to the Dapr applications that you want to include in distributed tracing, as shown in the following example:
45
45
46
46
```yaml
47
47
apiVersion: apps/v1
@@ -57,18 +57,18 @@ spec:
57
57
dapr.io/enabled: "true"
58
58
dapr.io/app-id: "MyApp"
59
59
dapr.io/app-port: "8080"
60
-
dapr.io/config: "appconfig"
60
+
dapr.io/config: "tracing"
61
61
```
62
62
63
63
{{% alert title="Note" color="primary" %}}
64
-
If you are using one of the Dapr tutorials, such as [distributed calculator](https://github.com/dapr/quickstarts/tree/master/tutorials/distributed-calculator), the `appconfig` configuration is already configured, so no additional settings are needed.
64
+
If you are using one of the Dapr tutorials, such as [distributed calculator](https://github.com/dapr/quickstarts/tree/master/tutorials/distributed-calculator), you will need to update the `appconfig` configuration to `tracing`.
65
65
{{% /alert %}}
66
66
67
67
You can register multiple tracing exporters at the same time, and the tracing logs are forwarded to all registered exporters.
68
68
69
69
That's it! There's no need to include any SDKs or instrument your application code. Dapr automatically handles the distributed tracing for you.
70
70
71
-
## View traces
71
+
## View traces
72
72
73
73
Deploy and run some applications. After a few minutes, you should see tracing logs appearing in your App Insights resource. You can also use the **Application Map** to examine the topology of your services, as shown below:
0 commit comments