You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π€ This issue has been generated by Claude Code.
Feature request
Give workflow authors a first-class way to add custom OTel resource attributes to the traces a workflow emits β beyond the fixed set gh-aw injects today (gh-aw.workflow.name, gh-aw.repository, gh-aw.run.id, github.run_id, gh-aw.engine.id).
Motivation
The observability.otlp block currently exposes only endpoint and headers. There is no supported way to attach arbitrary, workflow-defined metadata to spans as resource attributes. gh-aw composes OTEL_RESOURCE_ATTRIBUTES internally (pkg/workflow/observability_otlp.go β otelResourceAttributes) with a hard-coded list and no extension point.
Today the only workarounds are both poor:
Stuff metadata into OTLP headers. These are request-level HTTP headers, not span/resource attributes β they don't show up as queryable attributes on spans, and (depending on the consumer) don't reach the agent engine's own spans at all.
A concrete, common driver: workflows that run in one repository but act on a different target repository (e.g. dispatched via repository_dispatch from a target repo). The target repo is not github.repository, so there's no built-in attribute for it. Authors want to tag every span with, say, the target repo so traces can be grouped/filtered by it in the tracing backend.
Proposed shape
A map of custom resource attributes under observability.otlp, values supporting GitHub Actions expressions, merged into the generated OTEL_RESOURCE_ATTRIBUTES (so they apply to gh-aw's own spans and are inherited by the engine):
Expression support is important β most useful values are ${{ github.* }} / ${{ github.event.client_payload.* }}.
Coverage: ideally the attributes reach all jobs that emit spans (activation, agent, detection, conclusion, β¦), not just the agent job, so the metadata is consistent across the whole trace. (A user-authored pre-agent-steps workaround can only reach the agent job.)
Manual $GITHUB_ENV append in pre-agent-steps β works for the agent job only, is repetitive boilerplate, and pushes spec-encoding correctness onto every author.
Happy to help with a PR if there's interest and agreement on the schema (resource-attributes vs. a top-level observability.attributes, etc.).
π€ This issue has been generated by Claude Code.
Feature request
Give workflow authors a first-class way to add custom OTel resource attributes to the traces a workflow emits β beyond the fixed set gh-aw injects today (
gh-aw.workflow.name,gh-aw.repository,gh-aw.run.id,github.run_id,gh-aw.engine.id).Motivation
The
observability.otlpblock currently exposes onlyendpointandheaders. There is no supported way to attach arbitrary, workflow-defined metadata to spans as resource attributes. gh-aw composesOTEL_RESOURCE_ATTRIBUTESinternally (pkg/workflow/observability_otlp.goβotelResourceAttributes) with a hard-coded list and no extension point.Today the only workarounds are both poor:
headers. These are request-level HTTP headers, not span/resource attributes β they don't show up as queryable attributes on spans, and (depending on the consumer) don't reach the agent engine's own spans at all.OTEL_RESOURCE_ATTRIBUTESvia$GITHUB_ENV. Works, but it's boilerplate every author has to reinvent, only covers the agent job, and is easy to get wrong (e.g. value encoding β see OTEL_RESOURCE_ATTRIBUTES: un-encoded workflow names (spaces) make strict OTel consumers discard the entire resourceΒ #39595).A concrete, common driver: workflows that run in one repository but act on a different target repository (e.g. dispatched via
repository_dispatchfrom a target repo). The target repo is notgithub.repository, so there's no built-in attribute for it. Authors want to tag every span with, say, the target repo so traces can be grouped/filtered by it in the tracing backend.Proposed shape
A map of custom resource attributes under
observability.otlp, values supporting GitHub Actions expressions, merged into the generatedOTEL_RESOURCE_ATTRIBUTES(so they apply to gh-aw's own spans and are inherited by the engine):Compile-time behavior: these are appended to the existing
OTEL_RESOURCE_ATTRIBUTESvalue gh-aw already emits, rather than overriding it.Requirements / notes
${{ github.* }}/${{ github.event.client_payload.* }}.pre-agent-stepsworkaround can only reach the agent job.)Alternatives considered
headersβ wrong layer (request metadata, not span attributes); doesn't reach engine spans.$GITHUB_ENVappend inpre-agent-stepsβ works for the agent job only, is repetitive boilerplate, and pushes spec-encoding correctness onto every author.Happy to help with a PR if there's interest and agreement on the schema (
resource-attributesvs. a top-levelobservability.attributes, etc.).