Skip to content

Commit 1516a17

Browse files
author
rathnapandi
committed
- update readme for dynatrace
1 parent 36bb08c commit 1516a17

4 files changed

Lines changed: 82 additions & 5 deletions

File tree

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,27 +113,60 @@ export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta
113113
- Update datadog/docker-compose.yaml with key and site parameter
114114
```yaml
115115
environment:
116-
- DD_API_KEY=6<apikey>
116+
- DD_API_KEY=<apikey>
117117
- DD_SITE=us3.datadoghq.com
118118
```
119119
- Start OTEL collector
120120
```bash
121121
$docker-compose -f datadog/docker-compose.yaml start
122122
```
123+
- Setup environment variable for api gateway
124+
```
125+
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
126+
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
127+
export OTEL_TRACES_EXPORTER=otlp
128+
export OTEL_SERVICE_NAME=apim-gw
129+
export OTEL_METRICS_EXPORTER=none
130+
```
131+
132+
- Restart API Gateway
133+
134+
# Testing with Dynatrace
135+
136+
## Set up your Dynatrace account and environment variables
137+
- Create a Dynatrace account. If you don’t have one, you can use a [trial account](https://www.dynatrace.com/signup/).
138+
139+
- create an access token that includes scopes for the following:
123140

141+
Ingest OpenTelemetry traces (openTelemetryTrace.ingest)
142+
Ingest metrics (metrics.ingest) - Currently not used
143+
Ingest logs (logs.ingest) - currently not used
144+
For details, see [Dynatrace API – Tokens and authentication](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication) in the Dynatrace documentation.
124145

146+
- Update dynatrace/docker-compose.yaml with api key and dynatrace endpoint
147+
```yaml
148+
environment:
149+
- DT_API_TOKEN=<Access Token>
150+
- DT_ENDPOINT=https://{your-env-id}.live.dynatrace.com/api/v2/otlp
125151
```
126-
export OTEL_EXPORTER_OTLP_ENDPOINT=http://10.129.61.129:4317
152+
153+
- Start OTEL collector
154+
```bash
155+
$docker-compose -f dynatrace/docker-compose.yaml start
156+
```
157+
- Setup environment variable for api gateway
158+
```
159+
export OTEL_EXPORTER_OTLP_ENDPOINT=http://loclhost:4317
127160
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
128161
export OTEL_TRACES_EXPORTER=otlp
129162
export OTEL_SERVICE_NAME=apim-gw
130163
export OTEL_METRICS_EXPORTER=none
131164
```
132165

133-
134166
- Restart API Gateway
135167

136168

169+
137170
## Requests captured in OpenTelemetry
138171
- Policy exposed as Endpoint.
139172
- API manager Traffic

datadog/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
otel-collector:
44
image: otel/opentelemetry-collector-contrib
55
volumes:
6-
- ./otel2.yaml:/etc/otelcol-contrib/config.yaml
6+
- ./otel.yaml:/etc/otelcol-contrib/config.yaml
77
ports:
88
- 1888:1888 # pprof extension
99
- 8888:8888 # Prometheus metrics exposed by the Collector
@@ -13,5 +13,5 @@ services:
1313
- 4318:4318 # OTLP http receiver
1414
- 55679:55679 # zpages extension
1515
environment:
16-
- DD_API_KEY=6<apikey>
16+
- DD_API_KEY=<apikey>
1717
- DD_SITE=us3.datadoghq.com

dynatrace/docker-compose.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: "2"
2+
services:
3+
otel-collector:
4+
image: ghcr.io/dynatrace/dynatrace-otel-collector/dynatrace-otel-collector:0.15.0
5+
volumes:
6+
- ./otel.yaml:/etc/otelcol/config.yaml
7+
ports:
8+
- 13133:13133 # health_check extension
9+
- 4317:4317 # OTLP gRPC receiver
10+
- 4318:4318 # OTLP http receiver
11+
environment:
12+
- DT_API_TOKEN=<api-token>
13+
- DT_ENDPOINT='https://{your-env-id}.live.dynatrace.com/api/v2/otlp'

dynatrace/otel.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
receivers:
2+
otlp:
3+
protocols:
4+
grpc:
5+
endpoint: 0.0.0.0:4317
6+
http:
7+
endpoint: 0.0.0.0:4318
8+
9+
processors:
10+
cumulativetodelta:
11+
12+
exporters:
13+
otlphttp:
14+
endpoint: "${env:DT_ENDPOINT}"
15+
headers:
16+
Authorization: "Api-Token ${env:DT_API_TOKEN}"
17+
18+
service:
19+
pipelines:
20+
traces:
21+
receivers: [otlp]
22+
processors: []
23+
exporters: [otlphttp]
24+
metrics:
25+
receivers: [otlp]
26+
processors: [cumulativetodelta]
27+
exporters: [otlphttp]
28+
logs:
29+
receivers: [otlp]
30+
processors: []
31+
exporters: [otlphttp]

0 commit comments

Comments
 (0)