Using OpenTelemetry Collector to collect traces to send to AppInsights
Dapr integrates with 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.
A installation of Dapr on Kubernetes.
- First, you’ll need an Azure account. See instructions to apply for a free Azure account.
- Follow instructions here to create a new Application Insights resource.
- Get the Application Insights Intrumentation key from your Application Insights page.
Install the OpenTelemetry Collector to your Kubernetes cluster to push events to your Application Insights instance
Next, set up both a Dapr configuration file to turn on tracing and deploy a tracing exporter component that uses the OpenTelemetry Collector.
Create a collector-config.yaml file with this
Apply the configuration with .
When running in Kubernetes mode, apply the configuration by adding a annotation to the container that you want to participate in the distributed tracing, as shown in the following example:
That’s it! There’s no need include any SDKs or instrument your application code. Dapr automatically handles the distributed tracing for you.
Deploy and run some applications. After a few minutes, you should see tracing logs appearing in your Application Insights resource. You can also use the Application Map to examine the topology of your services, as shown below:
- Try out the observability quickstart