HYBIM-728 Renaming SDK Identifiers from galileo to splunk_ao#11
Conversation
…Identifiers-clean
…Identifiers-clean
Co-Authored-By: Claude <noreply@anthropic.com>
fercor-cisco
left a comment
There was a problem hiding this comment.
🤖 This review was generated by the Astra agent. It may contain mistakes.
Verdict: approve — Clean, internally-complete identifier rename; only a misleading comment about the header wire format needs fixing.
| # These headers follow the pattern of namespaced custom headers (X-Galileo-*) | ||
| TRACE_ID_HEADER = f"{GALILEO_HEADER_PREFIX}-Trace-ID" | ||
| PARENT_ID_HEADER = f"{GALILEO_HEADER_PREFIX}-Parent-ID" | ||
| # These headers follow the pattern of namespaced custom headers (Splunk-AO-*) |
There was a problem hiding this comment.
🟡 minor (documentation): This comment was changed to claim the headers follow the Splunk-AO-* pattern, but the actual emitted header values are unchanged: SPLUNK_AO_HEADER_PREFIX = "X-Galileo", so TRACE_ID_HEADER/PARENT_ID_HEADER resolve to X-Galileo-Trace-ID / X-Galileo-Parent-ID. The PR description explicitly states wire header values are intentionally left unchanged until the backend is updated. The previous comment (X-Galileo-*) was correct; the new text is now misleading. Revert the pattern in the comment to match the real wire format.
| # These headers follow the pattern of namespaced custom headers (Splunk-AO-*) | |
| # These headers follow the pattern of namespaced custom headers (X-Galileo-*) |
fercor-cisco
left a comment
There was a problem hiding this comment.
There's a small note on the Jira ticket that seems to have been overlooked.
As part of this ticket, we also want to change the string literal for the header prefix from "X-Galileo" to "Splunk-AO".
Any other code, test, docstring or comment that mentions the old header prefix also needs to be udpated.
This is what Claude Code came up with:
- The constant value (the core change)
- src/splunk_ao/constants/init.py:11 — SPLUNK_AO_HEADER_PREFIX = "X-Galileo" → "Splunk-AO"
Once this changes, TRACE_ID_HEADER and PARENT_ID_HEADER in tracing.py will automatically resolve to the new values.
- Hardcoded X-Galileo-SDK in production code (this header isn't covered by the constant) -- if possible change the code to use
SPLUNK_AO_HEADER_PREFIX
- src/splunk_ao/traces.py:63,189 — "X-Galileo-SDK" → "Splunk-AO-SDK"
- src/splunk_ao/experiments.py:678,745 — "X-Galileo-SDK" → "Splunk-AO-SDK"
- Docstrings and comments in production code
- src/splunk_ao/constants/tracing.py:6 — comment (X-Galileo-) → (Splunk-AO-) (the reviewer's fix)
- src/splunk_ao/tracing.py:16 — docstring mentions X-Galileo-Trace-ID / X-Galileo-Parent-ID
- src/splunk_ao/logger/logger.py:941-965 — docstring and example comments with X-Galileo-Trace-ID / X-Galileo-Parent-ID
- src/splunk_ao/middleware/tracing.py:91-92,160-161 — docstrings with X-Galileo-Trace-ID / X-Galileo-Parent-ID
- src/splunk_ao/utils/headers_data.py:64 — docstring mentions X-Galileo-SDK
- Tests asserting on literal header strings
- tests/test_logger_distributed.py:1878-1881,1903-1906 — asserts on "X-Galileo-Trace-ID" / "X-Galileo-Parent-ID"
- tests/test_api_headers.py — multiple asserts on "X-Galileo-SDK" (lines 41,42,45,56,75,90,91)
- tests/test_traces_client_headers.py:43-47 — asserts on "X-Galileo-SDK"
- Test docstrings/comments
- tests/test_middleware_tracing.py:213 — docstring mentions X-Galileo-Trace-ID / X-Galileo-Parent-ID
- tests/test_api_headers.py:1,15,34,35,49 — module/class/method docstrings mentioning X-Galileo-SDK
- tests/test_traces_client_headers.py:1,13,35,43 — same
Out of scope: src/galileo/resources/ is auto-generated from the OpenAPI spec — those "X-Galileo-SDK" usages should not be edited manually.
fercor-cisco
left a comment
There was a problem hiding this comment.
The header prefix change will be done separately.
Renames all public function, method, and module-level instance identifiers from galileo_* to splunk_ao_*, and renames the GALILEO_HEADER_PREFIX constant to
SPLUNK_AO_HEADER_PREFIX. All call sites, imports, docstrings, tests, READMEs, and AGENTS.md are updated across src/, tests/, galileo-adk/, and
galileo-a2a/.
What was renamed
Functions / methods / instances
Constants
Intentionally left unchanged
Testing
All 2015 unit tests pass with no failures.