Skip to content

docs: reconcile OTLP fan-out env var and sanitize package visibility#7534

Merged
lpcox merged 3 commits into
mainfrom
copilot/add-otlp-endpoint-documentation
Jun 14, 2026
Merged

docs: reconcile OTLP fan-out env var and sanitize package visibility#7534
lpcox merged 3 commits into
mainfrom
copilot/add-otlp-endpoint-documentation

Conversation

Copilot AI commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Nightly docs reconciliation found two user-facing gaps: GH_AW_OTLP_ENDPOINTS was implemented but undocumented in public docs, and internal/sanitize/ was missing from contributor-facing project structure docs. This PR aligns documentation with current behavior and package layout.

  • Tracing env var docs (user-facing)

    • Added GH_AW_OTLP_ENDPOINTS to:
      • README.md Tracing table
      • docs/ENVIRONMENT_VARIABLES.md OpenTelemetry/Tracing variables table
    • Documented:
      • supported formats (comma-separated URLs, JSON array with per-endpoint headers)
      • fan-out semantics (all endpoints receive spans)
      • precedence over OTEL_EXPORTER_OTLP_ENDPOINT
      • shared-header behavior for comma-separated entries
  • Contributor docs: project structure completeness

    • Updated CONTRIBUTING.md to include internal/sanitize/ in:
      • project tree
      • Key Directories section
    • Added concise package purpose: secret redaction helpers for safe logging.
  • Documentation snippet added

    | `GH_AW_OTLP_ENDPOINTS` | Comma-separated OTLP endpoint URLs, or a JSON array of `{ "url", "headers?" }` objects, for multi-backend fan-out tracing. When set, spans are exported to all listed endpoints (partial-failure tolerant). Takes precedence over `OTEL_EXPORTER_OTLP_ENDPOINT`. Shared headers from `OTEL_EXPORTER_OTLP_HEADERS` / config apply to comma-separated entries. | (none) |

GitHub Advanced Security started work on behalf of lpcox June 14, 2026 17:32 View session
GitHub Advanced Security finished work on behalf of lpcox June 14, 2026 17:33
Copilot AI changed the title [WIP] Add missing documentation for GH_AW_OTLP_ENDPOINTS docs: reconcile OTLP fan-out env var and sanitize package visibility Jun 14, 2026
Copilot finished work on behalf of lpcox June 14, 2026 17:37
Copilot AI requested a review from lpcox June 14, 2026 17:37
@lpcox lpcox marked this pull request as ready for review June 14, 2026 17:39
Copilot AI review requested due to automatic review settings June 14, 2026 17:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reconciles public and contributor documentation with existing gateway behavior by documenting the GH_AW_OTLP_ENDPOINTS tracing fan-out environment variable and by adding the missing internal/sanitize/ package to the documented project structure.

Changes:

  • Documented GH_AW_OTLP_ENDPOINTS in the README tracing section.
  • Added GH_AW_OTLP_ENDPOINTS to docs/ENVIRONMENT_VARIABLES.md with supported formats and precedence details.
  • Updated CONTRIBUTING.md project structure docs to include internal/sanitize/ and its purpose.
Show a summary per file
File Description
README.md Adds GH_AW_OTLP_ENDPOINTS to the tracing environment variable table.
docs/ENVIRONMENT_VARIABLES.md Adds detailed GH_AW_OTLP_ENDPOINTS documentation to the tracing variables table.
CONTRIBUTING.md Updates the documented internal/ directory tree and key directories list to include internal/sanitize/.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment thread docs/ENVIRONMENT_VARIABLES.md Outdated
|----------|-------------|---------|
| `OTEL_EXPORTER_OTLP_ENDPOINT` | OTLP HTTP endpoint for trace export (e.g., `http://localhost:4318`). Tracing is disabled when empty. Sets default for `--otlp-endpoint`. | (disabled) |
| `OTEL_EXPORTER_OTLP_HEADERS` | Comma-separated `key=value` HTTP headers for OTLP export requests (W3C Baggage format, e.g., `Authorization=Bearer%20token,X-Custom=value`). Used as fallback when `gateway.opentelemetry.headers` / `gateway.tracing.headers` is not set in config. | (none) |
| `GH_AW_OTLP_ENDPOINTS` | Comma-separated OTLP endpoint URLs, or a JSON array of `{ "url", "headers?" }` objects, for multi-backend fan-out tracing. When set, spans are exported to all listed endpoints (partial-failure tolerant). Takes precedence over `OTEL_EXPORTER_OTLP_ENDPOINT`. Shared headers from `OTEL_EXPORTER_OTLP_HEADERS` / config apply to comma-separated entries. | (none) |
GitHub Advanced Security started work on behalf of lpcox June 14, 2026 17:41 View session
GitHub Advanced Security finished work on behalf of lpcox June 14, 2026 17:43
@lpcox

lpcox commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

@copilot address review feedback

Copilot AI commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address review feedback

Addressed in 650176e. I updated docs/ENVIRONMENT_VARIABLES.md to document that shared OTLP headers apply to all GH_AW_OTLP_ENDPOINTS entries, with JSON per-endpoint headers overriding on key conflicts, and clarified the section as OpenTelemetry plus gateway-specific tracing variables.

GitHub Advanced Security started work on behalf of lpcox June 14, 2026 17:48 View session
Copilot finished work on behalf of lpcox June 14, 2026 17:48
GitHub Advanced Security finished work on behalf of lpcox June 14, 2026 17:49
@lpcox lpcox merged commit 25d8ac4 into main Jun 14, 2026
27 checks passed
@lpcox lpcox deleted the copilot/add-otlp-endpoint-documentation branch June 14, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants