This action will export GitHub Workflow telemetry data using OTLP to a configurable endpoint.
name: OpenTelemetry Export Trace
on:
workflow_run:
workflows: [my-workflow]
types: [completed]
jobs:
otel-export-trace:
name: OpenTelemetry Export Trace
runs-on: ubuntu-latest
steps:
- name: Export Workflow Trace
uses: inception-health/otel-export-trace-action@latest
with:
otlpEndpoint: grpc://api.honeycomb.io:443/
otlpHeaders: ${{ secrets.OTLP_HEADERS }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
runId: ${{ github.event.workflow_run.id }}name: OpenTelemetry Export Trace
on:
push:
branch: [main]
jobs:
build:
# Run build steps
otel-export-trace:
if: always()
name: OpenTelemetry Export Trace
runs-on: ubuntu-latest
needs: [build] # must run when all jobs are complete
steps:
- name: Export Workflow Trace
uses: inception-health/otel-export-trace-action@latest
with:
otlpEndpoint: grpc://api.honeycomb.io:443/
otlpHeaders: ${{ secrets.OTLP_HEADERS }}
githubToken: ${{ secrets.GITHUB_TOKEN }}Combined with OpenTelemetry Upload Trace Artifact this action will Download the OTLP Trace Log Artifact uploaded from the Workflow Run and export it.
pr-workflow.yml
name: "PR check"
on:
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: run tests
run: npm run test:ci
- uses: inception-health/otel-upload-test-artifact-action@v1
if: always()
with:
jobName: "build-and-test"
stepName: "run tests"
path: "junit.xml"
type: "junit"
githubToken: ${{ secrets.GITHUB_TOKEN }}otel-export-trace.yml
name: OpenTelemetry Export Trace
on:
workflow_run:
workflows: ["PR check"]
types: [completed]
jobs:
otel-export-trace:
name: OpenTelemetry Export Trace
runs-on: ubuntu-latest
steps:
- name: Export Workflow Trace
uses: inception-health/otel-export-trace-action@latest
with:
otlpEndpoint: grpc://api.honeycomb.io:443/
otlpHeaders: ${{ secrets.OTLP_HEADERS }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
runId: ${{ github.event.workflow_run.id }}| name | description | required | default |
|---|---|---|---|
| otlpEndpoint | The destination endpoint to export OpenTelemetry traces to | true | |
| otlpHeaders | Network Headers for the destination endpoint to export OpenTelemetry traces to. Ex. x-honeycomb-team=YOUR_API_KEY,x-honeycomb-dataset=YOUR_DATASET |
true | |
| otelServiceName | OpenTelemetry service name | false | |
| githubToken | The repository token with Workflow permissions. Not required for public repos | false | |
| runId | Workflow Run ID to Export | false | env.GITHUB_RUN_ID |
| name | description |
|---|---|
| traceId | The OpenTelemetry Trace ID for this Trace |


