Add a credential-isolated OTLP gateway for agent-native OpenTelemetry

Open
#10,445 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, node.js, typescript

Research direction

Start by reading src/awf-config-schema.json, src/services/api-proxy-env-config.ts, and containers/api-proxy/server.js, along with the linked OTEL environment and configuration docs. Trace how agent environment variables and trusted sidecar exports are configured, then map the sandbox topologies named in the issue. Done means a documented config and minimum-version contract plus focused tests demonstrate authenticated traces, metrics, and logs through the gateway without exposing upstream credentials or changing AWF's own exporter behavior.

Written by the indexing model from the issue text.

Description

Problem

gh-aw needs to declare whether an agentic engine supports OpenTelemetry and automatically configure supported engines to export to the workflow's default collector from inside the agent sandbox. Agent telemetry should be gatewayed by AWF rather than giving the untrusted agent the external collector's credentials.

The currently pinned AWF release in gh-aw is v0.28.70. AWF supports forwarding OTEL_* variables, automatically allowing collector destinations, and proxying OTLP/HTTP egress through Squid. The API-proxy sidecar also exports its own spans. However, the inspected configuration schemas and API-proxy implementation do not expose an agent-facing OTLP ingestion gateway that keeps upstream endpoint credentials in the trusted sidecar. Squid transport proxying alone does not provide that credential boundary.

Relevant sources:

Requested behavior

Provide an explicit AWF configuration contract to enable agent-native OTLP export through a trusted AWF-owned gateway:

  • Expose sandbox-reachable OTLP/HTTP ingestion endpoints for traces, metrics, and logs, supporting standard SDK configuration (prefer http/protobuf).
  • Set or rewrite the agent's standard OTEL_EXPORTER_OTLP_ENDPOINT and protocol variables to the internal gateway. Keep real collector headers, endpoint credentials, workload-identity tokens, and gh-aw multi-endpoint configuration out of the agent environment.
  • Forward agent telemetry only to the configured default collector. Multi-target agent export is not required; existing fan-out for AWF's own spans must remain unchanged. Prevent per-signal overrides from selecting additional external collectors.
  • Resolve authentication in the trusted gateway, including applicable workload-identity handling, rather than requiring credentials in the agent.
  • Preserve resource attributes and trace correlation without rewriting engine-originated telemetry into AWF-originated spans.
  • Make the gateway reachable under supported AWF sandbox runtimes/topologies, including isolated Docker, ARC/DinD, and supported microVM profiles, without broadening the agent's external egress permissions.
  • Leave agent export disabled when no usable default collector is configured, and report invalid configuration without printing secrets.
  • Publish the config/schema and minimum-version contract so gh-aw can gate this integration reliably.

Acceptance criteria

  1. A mock instrumented agent can export traces, metrics, and logs through AWF to a test collector using only internal gateway configuration.
  2. The collector receives authenticated requests, while agent environment/process inspection and emitted config/log artifacts contain no upstream collector credentials.
  3. A multi-endpoint host configuration sends agent telemetry to the default collector only; AWF's own exporter behavior is unchanged.
  4. Per-signal overrides cannot bypass the configured gateway/default destination.
  5. Missing collector configuration, exporter failures, shutdown flushing, payload limits, and supported sandbox connectivity are covered by focused tests.

This blocks safely enabling capability-driven engine OTEL export in github/gh-aw; forwarding the existing exporter headers into the agent would weaken its current credential exclusions.

Dominant language
TypeScript
Stars
169
Forks
89
Avg merge
5h 18m
Merged PRs (30d)
450

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/gh-aw-firewall

All issues in github/gh-aw-firewall

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.