Skip to content

HYBIM-822 Changing headers in examples#58

Merged
shuningc merged 6 commits into
mainfrom
HYBIM-822-changeHeaderInExamples
Jun 29, 2026
Merged

HYBIM-822 Changing headers in examples#58
shuningc merged 6 commits into
mainfrom
HYBIM-822-changeHeaderInExamples

Conversation

@shuningc

@shuningc shuningc commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Rename GALILEO_* environment variables to SPLUNK_AO_* across all example .env files
  • Rename the Galileo-API-Key HTTP header to Splunk-AO-API-Key in examples (langgraph-otel, strands-agents, langgraph-traceloop
    README, log-mcp-calls, otel-collector config) and in the SDK source (src/splunk_ao/traces.py, src/splunk_ao/otel.py)

Details

The following header/env renames are covered:

│ Old │ New │

│ GALILEO_API_KEY │ SPLUNK_AO_API_KEY │

│ GALILEO_CONSOLE_URL │ SPLUNK_AO_CONSOLE_URL │

│ GALILEO_PROJECT │ SPLUNK_AO_PROJECT │

│ GALILEO_LOG_STREAM │ SPLUNK_AO_LOG_STREAM │

│ Galileo-API-Key (HTTP header) │ Splunk-AO-API-Key │

The upstream API and ingest-service now accept Splunk-AO-Api-Key (api/pull/6788, orbit/pull/985).

Notes

  • src/galileo/resources/ (X-Galileo-SDK → Splunk-AO-SDK) and the _bridge_env_vars removal in config.py are intentionally deferred to
    a separate PR
  • test_api_headers.py remains skipped pending the X-Galileo-SDK rename in resources

@shuningc shuningc requested a review from fercor-cisco June 29, 2026 21:06
@shuningc shuningc changed the title Hybim 822 change header in examples Hybim 822 Changing headers in examples Jun 29, 2026
@shuningc shuningc changed the title Hybim 822 Changing headers in examples HYBIM-822 Changing headers in examples Jun 29, 2026

@fercor-cisco fercor-cisco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 This review was generated by the Astra agent (claude-opus-4-8). It may contain mistakes.

Verdict: approve — Faithful mechanical rename; example .env files match code that already reads SPLUNK_AO_*, and the two SDK header renames are localized and consistent. Main dependency (upstream accepting the new header) is coordinated and gated by the migration doc.

General Comments

  • 🟠 major (question): This PR flips the live ingest auth header from Galileo-API-Key to Splunk-AO-API-Key in src/splunk_ao/traces.py (IngestTraces) and src/splunk_ao/otel.py (OTLP exporter). These are the actual authentication headers sent on every trace/span ingest request, so if the upstream ingest service does not yet accept Splunk-AO-API-Key in the environment this SDK targets, all ingestion will fail with 401. The description references api/#6788 and orbit/#985 as adding support — can you confirm those are deployed (not just merged) to the environments these examples point at (api.galileo.ai) before this merges? The design doc (docs/SPLUNK_AO_ENV_RENAME.md) also carries a "Do not merge until migration complete" notice worth honoring here.

Minor consistency note: the code uses Splunk-AO-API-Key while the PR description and upstream PRs spell it Splunk-AO-Api-Key. HTTP header names are case-insensitive (RFC 7230) so this won't break, but worth confirming the upstream allow-list isn't doing a case-sensitive string compare.

  • 🟡 minor (testing): The Splunk-AO-API-Key header rename in IngestTraces._headers (traces.py:188) and the OTLP exporter (otel.py:143) has no test asserting the new header name. The existing tests/test_traces_client_headers.py only covers the Splunk-AO-SDK header on the Traces class, not the *-API-Key header on IngestTraces/SplunkAOOTLPExporter. Since this is the auth-critical change in the PR, a small assertion that the constructed headers dict contains Splunk-AO-API-Key (and no longer Galileo-API-Key) would guard against a future revert/typo.

Follow-ups

Suggested follow-up work that could be tracked as Shortcut stories:

  • README.md:29-34: Top-level README still documents GALILEO_API_KEY, GALILEO_PROJECT, GALILEO_LOG_STREAM, GALILEO_LOGGING_DISABLED, GALILEO_CONSOLE_URL (lines 29-34, 46, 77, 180). This PR scope is examples + SDK headers, but the user-facing README will be inconsistent with the renamed examples once this lands. Worth a follow-up to rename these (or confirm it's covered by the deferred config.py/resources PR).
  • openapi.yaml:41595-41595: The bundled OpenAPI spec still declares the APIKeyHeader security scheme as name: Galileo-API-Key. If the spec is meant to track the upstream API, it should be regenerated to Splunk-AO-API-Key alongside the header rename. Likely belongs with the upstream spec regeneration rather than this PR.

@shuningc shuningc merged commit 0a053b0 into main Jun 29, 2026
13 checks passed
@shuningc shuningc deleted the HYBIM-822-changeHeaderInExamples branch June 29, 2026 23:42
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants