Skip to content

Commit

Permalink
updating collector example
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Aug 16, 2024
1 parent 35776f9 commit 1afc34a
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 57 deletions.
7 changes: 4 additions & 3 deletions examples/tracetest-azure-app-insights-collector/.env.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Azure
INSTRUMENTATION_KEY=""
# Get the required information here: https://app.tracetest.io/retrieve-token

# Tracetest API key and token
TRACETEST_API_KEY="<YOUR_TRACETEST_API_KEY>"
TRACETEST_API_TOKEN="<YOUR_TRACETEST_TOKEN>"

# Azure
APP_INSIGHTS_INSTRUMENTATION_STRING="InstrumentationKey=14f0532a-aad4-4cb1-9bdb-64d021622efd;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/"
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ processors:

exporters:
azuremonitor:
instrumentation_key: ${INSTRUMENTATION_KEY}
instrumentation_key: ${env:INSTRUMENTATION_KEY}
otlp/tracetest-agent:
endpoint: tracetest-agent:4317
tls:
Expand All @@ -20,7 +20,7 @@ service:
traces/tracetest:
receivers: [otlp]
processors: [batch]
exporters: [otlp/tracetest, otlp/tracetest-agent]
exporters: [otlp/tracetest-agent]
traces/appinsights:
receivers: [otlp]
exporters: [azuremonitor]
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,63 @@ services:
build: .
ports:
- "8080:8080"
depends_on:
otel-collector:
condition: service_started

otel-collector:
image: otel/opentelemetry-collector-contrib:latest
image: otel/opentelemetry-collector-contrib:0.100.0
command:
- "--config"
- "/otel-local-config.yaml"
volumes:
- ./collector.config.yaml:/otel-local-config.yaml
environment:
INSTRUMENTATION_KEY: ${INSTRUMENTATION_KEY}
INSTRUMENTATION_KEY: ${APP_INSIGHTS_INSTRUMENTATION_STRING}
ports:
- 4317:4317

# Cloud-based Managed Tracetest
tracetest-agent:
image: kubeshop/tracetest-agent:latest
environment:
# Find the Agent API Key here: https://docs.tracetest.io/configuration/agent
- TRACETEST_API_KEY=${TRACETEST_API_KEY}
# Get the required information here: https://app.tracetest.io/retrieve-token
- TRACETEST_API_KEY=${TRACETEST_TOKEN}
- TRACETEST_ENVIRONMENT_ID=${TRACETEST_ENVIRONMENT_ID}

tracetest-apply:
build:
dockerfile: Dockerfile.tracetest
volumes:
- ./resources:/resources
environment:
TRACETEST_TOKEN: ${TRACETEST_TOKEN}
TRACETEST_ENVIRONMENT_ID: ${TRACETEST_ENVIRONMENT_ID}
entrypoint:
- bash
- /resources/apply.sh
networks:
default: null
depends_on:
app:
condition: service_started
tracetest-agent:
condition: service_started

tracetest-run:
build:
dockerfile: Dockerfile.tracetest
volumes:
- ./resources:/resources
environment:
TRACETEST_TOKEN: ${TRACETEST_TOKEN}
TRACETEST_ENVIRONMENT_ID: ${TRACETEST_ENVIRONMENT_ID}
entrypoint:
- bash
- /resources/run.sh
networks:
default: null
depends_on:
tracetest-apply:
condition: service_completed_successfully

18 changes: 0 additions & 18 deletions examples/tracetest-azure-app-insights-collector/test-api.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions examples/tracetest-azure-app-insights-collector/tests/test.yaml

This file was deleted.

This file was deleted.

0 comments on commit 1afc34a

Please sign in to comment.