GitHub Actions Traces

This document contains instructions on how to get the traces of your GitHub Actions pipeline in SigNoz using GitHub Receiver.

Prerequisites

  • Ensure a Webhook is created in the repository with workflow_run and workflow_job events enabled. Make content type as application/json.

  • Have a GitHub Actions workflow for your repo.

Setup

Step 1. Setup OTel Collector

The OpenTelemetry (OTel) Collector helps collect telemetry data such as logs, traces and metrics from your application. Please follow the documentation here to setup the OpenTelmetry Collector in your VM. Make sure to use the latest OTel Collector release.

Step 2. Setup GitHub Receiver

Update the config.yaml file that you created in otelcol-contrib folder while setting up OTel Collector to include the github receiver under the receivers section.

/otelcol-contrib/config.yaml
...
receivers:
  github:
    webhook:
      endpoint: 0.0.0.0:19418
      path: /events
      health_path: /health #optional
      secret: ${GITHUB_WEBHOOK_SECRET}
      service_name: <service-name> #optional
    scrapers:
      scraper:
...
  • GITHUB_WEBHOOK_SECRET: This environment variable, which you will create in Step 4, contains the shared secret used to verify that incoming webhook requests are from GitHub. It ensures authenticity and helps prevent tampered or spoofed requests.
  • <service-name>: Specifies the service that emits the traces, making it easier to identify and filter traces related to a specific GitHub integration.

Step 3. Add GitHub Receiver to pipelines

In the config.yaml file, under the service section, locate the pipelines block. Within the traces pipeline, add github to the list of receivers.

/otelcol-contrib/config.yaml
...
service:
  pipelines:
    traces:
      receivers: [github]
      processors: []
      exporters: [otlp,debug]
...

Step 4. Run the OTel Collector

Set an environment variable named GITHUB_WEBHOOK_SECRET. Inside otelcol-contrib folder, run the otelcol-contrib command.

export GITHUB_WEBHOOK_SECRET=<webhook-secret>
./otelcol-contrib --config ./config.yaml
  • <webhook-secret>: Your GitHub webhook secret.

Validate Traces in SigNoz

  • Traces can be viewed under the Traces tab in the SigNoz UI.
GitHub Receiver Traces Console
GitHub Action Traces in Traces View
  • You can click on a particular TraceID in the Traces view to get the detailed view of the GitHub Actions workflow as shown in the image below.
Details of a Particular Trace
Details of a Particular Trace

Was this page helpful?