|
1 | 1 | # Export Job Telemetry |
2 | 2 |
|
3 | | -This GitHub Action exports telemetry data for a GitHub Actions job, including resource attributes and timing information, using OpenTelemetry. |
| 3 | +This GitHub Action is designed to export telemetry data for a GitHub Actions job, including resource attributes and timing information, using OpenTelemetry. To minimise API calls to the GitHub API and to ensure deterministic trace and span IDs, instrument your workflow with [https://github.com/krzko/set-up-telemetry](https://github.com/krzko/set-up-telemetry). |
| 4 | + |
| 5 | +This action is intended to be used in conjunction with the [OpenTelemetry Collector GitHub Actions Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27460). This receiver processes GitHub Actions webhook events to observe workflows and jobs, converting them into trace telemetry for detailed observability. |
4 | 6 |
|
5 | 7 | ## Features |
6 | 8 |
|
7 | 9 | - Export trace data in OpenTelemetry format. |
8 | 10 | - Capture and report the start and end times of the GitHub Actions job. |
9 | 11 | - Include custom resource attributes for enhanced observability. |
| 12 | +- Utilises deterministic Trace and Span IDs to align with the OpenTelemetry Collector GitHub Actions Receiver. |
| 13 | + |
| 14 | +## GitHub Actions Receiver |
| 15 | + |
| 16 | +The GitHub Actions Receiver processes GitHub Actions webhook events to observe workflows and jobs. It handles `workflow_job` and `workflow_run` event payloads, transforming them into trace telemetry. This allows the observation of workflow execution times, success, and failure rates. If a secret is configured (recommended), it validates the payload ensuring data integrity before processing. |
| 17 | + |
| 18 | +For more details on the receiver, see the GitHub issue: [OpenTelemetry Collector Contrib #27460](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27460). |
10 | 19 |
|
11 | 20 | ## Usage |
12 | 21 |
|
|
31 | 40 | steps: |
32 | 41 | - name: Set up telemetry |
33 | 42 | id: set-up-telemetry |
34 | | - uses: krzko/set-up-telemetry@v0.1.0 |
| 43 | + uses: krzko/set-up-telemetry@v0.2.0 |
35 | 44 |
|
36 | 45 | - name: Checkout |
37 | 46 | uses: actions/checkout@v4 |
|
40 | 49 |
|
41 | 50 | - name: Export job telemetry |
42 | 51 | if: always() |
43 | | - uses: krzko/export-job-telemetry@v0.1.0 |
| 52 | + uses: krzko/export-job-telemetry@v0.2.0 |
44 | 53 | with: |
45 | 54 | job-status: ${{ job.status }} |
46 | 55 | otel-exporter-otlp-endpoint: ${{ env.otel-exporter-otlp-endpoint }} |
|
54 | 63 | steps: |
55 | 64 | - name: Set up telemetry |
56 | 65 | id: set-up-telemetry |
57 | | - uses: krzko/set-up-telemetry@v0.1.0 |
| 66 | + uses: krzko/set-up-telemetry@v0.2.0 |
58 | 67 |
|
59 | 68 | - name: Checkout |
60 | 69 | uses: actions/checkout@v4 |
|
0 commit comments