From b2d115e89380f29b2f5a3669929f32bc01e42a5c Mon Sep 17 00:00:00 2001 From: Ran Nozik Date: Wed, 26 Oct 2022 07:43:22 +0300 Subject: [PATCH] add helios config --- .github/workflows/run.yml | 24 ++++++++++++++++++++++++ src/otelcollector/otelcol-config.yml | 7 ++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/run.yml diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml new file mode 100644 index 0000000000..d35e4770a8 --- /dev/null +++ b/.github/workflows/run.yml @@ -0,0 +1,24 @@ +name: "Run OpenTelemetry demo" + +on: + workflow_dispatch: + schedule: + - cron: "0 */4 * * *" # Run every 4 hours, at :00 sharp. + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run + run: sed -i "s/DEMO_HS_TOKEN/${DEMO_HS_TOKEN}/" './src/otelcollector/otelcol-config.yml' && docker compose build otelcol && docker compose up -d --no-build + env: + DEMO_HS_TOKEN: ${{ secrets.DEMO_HS_TOKEN }} + + - name: Sleep for 5 minutes + uses: juliangruber/sleep-action@v1 + with: + time: 5m + + - name: Stop docker + run: docker compose stop loadgenerator && sleep 30 && docker compose down diff --git a/src/otelcollector/otelcol-config.yml b/src/otelcollector/otelcol-config.yml index 30b75a1a01..cdbc01b558 100644 --- a/src/otelcollector/otelcol-config.yml +++ b/src/otelcollector/otelcol-config.yml @@ -23,6 +23,11 @@ exporters: resource_to_telemetry_conversion: enabled: true enable_open_metrics: true + otlphttp: + endpoint: "https://collector.heliosphere.io" + traces_endpoint: "https://collector.heliosphere.io/traces" + headers: + Authorization: "DEMO_HS_TOKEN" processors: batch: @@ -46,7 +51,7 @@ service: traces: receivers: [otlp] processors: [batch] - exporters: [otlp, logging, spanmetrics] + exporters: [otlp, logging, spanmetrics, otlphttp] metrics: receivers: [otlp, spanmetrics] processors: [filter, transform, batch]