[MCC-1487238] Python Lib - Add Headers to each request for logging#40
Merged
Conversation
…port - Thread user_uuid from DataConnectClient.connect down to ArrowFlightTransport - Dynamically resolve client IP address via UDP socket with local loopback fallback - Dynamically read python-sdk-version with safe fallback on PackageNotFoundError - Force sdk-type header to 'Python' - Add comprehensive happy path and defensive edge-case unit tests
- Fix import order sorting using ruff rules - Remove trailing whitespaces and redundant empty lines
- Clean up unused or commented-out lines of code - Remove obsolete inline documentation to improve readability
dsilaghi-mdsol
force-pushed
the
feat/MCC-1487238-add-logging-headers
branch
from
May 25, 2026 11:45
e087a6a to
224cb60
Compare
butsyk-mdsol
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MCC-1487238 - Add Headers to each request for logging
Checklist
<App>-<Fix Details>ADD LABELS!Changes
Jira Ticket: MCC-1487238 Add Headers to each request for logging
This PR introduces comprehensive request tracing and telemetry headers injected into the Arrow Flight transport layer to fulfill logging and traceability requirements across environments.
Summary of Implementation:
DataConnectClient.connect()factory method to acceptuser_uuidfrom Enodia and pass it cleanly down to the transport layer instantiation.ArrowFlightTransport.__init__constructor to dynamically populateself._call_headerswith four required binary metadata tuples:user-uuid: The authenticated Enodia user identifier (AC-01).python-sdk-version: The dynamic package version fetched viaimportlib.metadata(AC-02).sdk-type: Hardcoded value set toPython(AC-03).client-ip: The host's outgoing network interface IP address resolved via a lightweight socket lookup (AC-04).127.0.0.1for offline environments and0.1.0for missing package states) to guarantee client execution under any system state.Screen Shots
(IF NEEDED)N/A - Backend protocol and client logging fix.
Before
N/A
After
N/A