diff --git a/examples/otel/README.md b/examples/otel/README.md index 7b23690..57ffaf9 100644 --- a/examples/otel/README.md +++ b/examples/otel/README.md @@ -50,6 +50,21 @@ $ docker-compose -f datadog-docker-compose.yml down ``` Now simply point your browser at Datadog cloud https://app.datadoghq.com/metric/explorer to see Aerospike metrics. +## DynaTrace +### modify dynatrace-otel-collector-config.yml and update below key with respective values +###### +### To start the stack +``` +$ docker-compose -f dynatrace-docker-compose.yml up +``` +## To stop the stack +``` +$ docker-compose -f dynatrace-docker-compose.yml down +``` +Now simply point your browser at DynaTrace cloud https://.apps.dynatrace.com/ui/apps/dynatrace.classic.metrics/ui/metrics to see Aerospike metrics. + +See [OTel-DynaTrace-documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/dynatraceexporter/README.md) + ## Cloudwatch ### modify cloudwatch-docker-compose.yml and update below keys with respective values ###### AWS_REGION= diff --git a/examples/otel/dynatrace-docker-compose.yml b/examples/otel/dynatrace-docker-compose.yml new file mode 100644 index 0000000..3fea0e3 --- /dev/null +++ b/examples/otel/dynatrace-docker-compose.yml @@ -0,0 +1,35 @@ +version: "3.7" +services: + + exporter: + image: aerospike/aerospike-prometheus-exporter:latest + networks: + - aerospike_otel_nw + container_name: as_prom_exporter + environment: + - AS_HOST=host.docker.internal + - AS_PORT=3000 + - "METRIC_LABELS=type='development',source='aerospike', latitude='36.778259', longitude='-119.417931' " + extra_hosts: + - "host.docker.internal:host-gateway" + + # Collector + otel-collector: + networks: + - aerospike_otel_nw + image: otel/opentelemetry-collector-contrib:latest + container_name: as_otel_contrib + privileged: true + restart: always + volumes: + - source: ./dynatrace-otel-collector-config.yml + target: /etc/otel-collector-config.yml + type: bind + command: ["--config=/etc/otel-collector-config.yml"] + +volumes: + otel_prometheus_data: {} + otel_data: {} +networks: + aerospike_otel_nw: + driver: bridge diff --git a/examples/otel/dynatrace-otel-collector-config.yml b/examples/otel/dynatrace-otel-collector-config.yml new file mode 100644 index 0000000..941c1a6 --- /dev/null +++ b/examples/otel/dynatrace-otel-collector-config.yml @@ -0,0 +1,47 @@ +receivers: + otlp: + protocols: + grpc: + endpoint: "as_otel_contrib:4317" + + prometheus: + config: + scrape_configs: + - job_name: 'otel_as_demo_server' + scrape_interval: 10s + static_configs: + - targets: ['as_prom_exporter:9145'] + +exporters: + prometheus: + # this is the local otel-col-contrib prometheus exporter + endpoint: "as_otel_contrib:30145" + + dynatrace: + prefix: as_dynatrace_demo + endpoint: https://{YOUR-ENVIRONMENT-ID}.live.dynatrace.com/api/v2/metrics/ingest + api_token: + + logging: + +processors: + batch: + +extensions: + health_check: + pprof: + endpoint: :1888 + zpages: + endpoint: :55679 + +service: + extensions: [pprof, zpages, health_check] + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [ logging ] + metrics: + receivers: [prometheus ] + processors: [batch] + exporters: [logging , prometheus, dynatrace]