Update OpenTelemetry Collector doc to use Zipkin API (#990)

This commit is contained in:
Nghia Tran 2020-12-09 08:43:35 -08:00 committed by GitHub
parent 2c0933084c
commit 75f3c739f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 35 deletions

View File

@ -6,7 +6,7 @@ weight: 1000
description: "How to use Dapr to push trace events to Azure Application Insights, through the OpenTelemetry Collector."
---
Dapr can integrate with [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) using the OpenCensus API. This guide walks through an example to use Dapr to push trace events to Azure Application Insights, through the OpenTelemetry Collector.
Dapr can integrate with [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) using the Zipkin API. This guide walks through an example to use Dapr to push trace events to Azure Application Insights, through the OpenTelemetry Collector.
## Requirements
@ -35,9 +35,9 @@ Next, install the OpenTelemetry Collector to your Kubernetes cluster to push eve
Next, set up both a Dapr configuration file to turn on tracing and deploy a tracing exporter component that uses the OpenTelemetry Collector.
1. Create a collector-component.yaml file with this [content](/docs/open-telemetry-collector/collector-component.yaml)
1. Create a collector-config.yaml file with this [content](/docs/open-telemetry-collector/collector-config.yaml)
2. Apply the configuration with `kubectl apply -f collector-component.yaml`.
2. Apply the configuration with `kubectl apply -f collector-config.yaml`.
### Deploy your app with tracing

View File

@ -1,22 +0,0 @@
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: appconfig
namespace: default
spec:
tracing:
samplingRate: "1"
---
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: native
namespace: default
spec:
type: exporters.native
version: v1
metadata:
- name: enabled
value: "true"
- name: agentEndpoint
value: "otel-collector.default.svc.cluster.local:55678"

View File

@ -0,0 +1,10 @@
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: appconfig
namespace: default
spec:
tracing:
samplingRate: "1"
zipkin:
endpointAddress: "http://otel-collector.default.svc.cluster.local:9411/api/v2/spans"

View File

@ -8,8 +8,8 @@ metadata:
data:
otel-collector-config: |
receivers:
opencensus:
endpoint: 0.0.0.0:55678
zipkin:
endpoint: 0.0.0.0:9411
processors:
queued_retry:
batch:
@ -20,8 +20,9 @@ data:
zpages:
endpoint: :55679
exporters:
logging:
loglevel: debug
azuremonitor:
azuremonitor/2:
endpoint: "https://dc.services.visualstudio.com/v2/track"
instrumentation_key: "<INSTRUMENTATION-KEY>"
# maxbatchsize is the maximum number of items that can be
@ -34,8 +35,8 @@ data:
extensions: [pprof, zpages, health_check]
pipelines:
traces:
receivers: [opencensus]
exporters: [azuremonitor/2]
receivers: [zipkin]
exporters: [azuremonitor,logging]
processors: [batch, queued_retry]
---
apiVersion: v1
@ -47,10 +48,10 @@ metadata:
component: otel-collector
spec:
ports:
- name: opencensus # Default endpoint for Opencensus receiver.
port: 55678
- name: zipkin # Default endpoint for Zipkin receiver.
port: 9411
protocol: TCP
targetPort: 55678
targetPort: 9411
selector:
component: otel-collector
---
@ -86,7 +87,7 @@ spec:
cpu: 200m
memory: 400Mi
ports:
- containerPort: 55678 # Default endpoint for Opencensus receiver.
- containerPort: 9411 # Default endpoint for Zipkin receiver.
volumeMounts:
- name: otel-collector-config-vol
mountPath: /conf