Skip to content

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

Open

Description

@pelikhan

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions