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 GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stalelast commit May 22, 2024
License
Apache 2.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: krzko/run-with-telemetry@c2636c369317450dfd825ae4b67760d49600ca18 # v0.5.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
github-tokenA token that can be used with the GitHub API.yes${{ github.token }}
job-as-parentUse the job name as the trace parent. This is useful when you want to correlate the trace with the job. nofalse
job-nameThe name of the GitHub Actions job. no
otel-exporter-otlp-endpointA base endpoint URL for any signal type, with an optionally-specified port number. yes
otel-exporter-otlp-headersHeaders to attach to outgoing the OTLP gRPC exporter. Set via comma separated values; header1=value1,header2=value2. no
otel-resource-attributesKey-value pairs to be used as resource attributes. Set via comma seperated values; key1=value1,key2=value2 no
otel-service-nameLogical name of the service. Sets the value of the service.name resource attribute. yes
runThe command to run. yes
shellYou 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. nobash
stderr-as-infoIf set to 'true', logs stderr as informational messages instead of errors. Useful for commands that use stderr for standard output. nofalse
step-nameThe name of the step. yes
namedescription
trace-idThe Trace ID generated for the OpenTelemetry trace.
job-nameThe name of the GitHub Actions job.