krzko/Run with Telemetry
Execute a command on the runner and export the associated OpenTelemetry trace. This action is cross-platform compatible across Linux, macOS, and Windows. It is designed to work optimally with the OpenTelemetry Collector, GitHub Actions Event Receiver, aligning the telemetry within steps to what the receiver emits. This action also injects OTEL-* environment variables into the shell, enabling further configuration of the OpenTelemetry instrumentation.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit May 22, 2024
- License
- Apache 2.0
Pinned Snippet
uses: krzko/run-with-telemetry@c2636c369317450dfd825ae4b67760d49600ca18 # v0.5.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| github-token | A token that can be used with the GitHub API. | yes | ${{ github.token }} |
| job-as-parent | Use the job name as the trace parent. This is useful when you want to correlate the trace with the job. | no | false |
| job-name | The name of the GitHub Actions job. | no | — |
| otel-exporter-otlp-endpoint | A base endpoint URL for any signal type, with an optionally-specified port number. | yes | — |
| otel-exporter-otlp-headers | Headers to attach to outgoing the OTLP gRPC exporter. Set via comma separated values; header1=value1,header2=value2. | no | — |
| otel-resource-attributes | Key-value pairs to be used as resource attributes. Set via comma seperated values; key1=value1,key2=value2 | no | — |
| otel-service-name | Logical name of the service. Sets the value of the service.name resource attribute. | yes | — |
| run | The command to run. | yes | — |
| shell | You can override the default shell settings in the runner's operating system using the shell keyword. Supported options are bash, pwsh, python, sh, cmd, pwsh and powershell. The default is bash. | no | bash |
| stderr-as-info | If set to 'true', logs stderr as informational messages instead of errors. Useful for commands that use stderr for standard output. | no | false |
| step-name | The name of the step. | yes | — |
Outputs
| name | description |
|---|---|
| trace-id | The Trace ID generated for the OpenTelemetry trace. |
| job-name | The name of the GitHub Actions job. |