Skip to content

fix(agentgateway): remove telemetry source attribution from _lob.py#227

Closed
tiagoek wants to merge 2 commits into
mainfrom
fix/lob-remove-telemetry-source
Closed

fix(agentgateway): remove telemetry source attribution from _lob.py#227
tiagoek wants to merge 2 commits into
mainfrom
fix/lob-remove-telemetry-source

Conversation

@tiagoek

@tiagoek tiagoek commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Requested by @smahr (PR #220) to remove telemetry source attribution from _lob.py specifically, so that internal destination calls made by the LoB auth helpers are not counted as cross-module traffic from AGENTGATEWAY in observability dashboards.

What changes:

  • Remove _telemetry_source=Module.AGENTGATEWAY from create_destination_client() in _fetch_auth_token and get_ias_client_id_lob
  • Drop the now-unused from sap_cloud_sdk.core.telemetry import Module import
  • Bump version to 0.35.1

Why:
Without _telemetry_source, record_metrics treats these calls as user-facing (source=None) rather than internal SDK plumbing. The intent is that the auth/IAS resolution steps in the LoB flow should not show up as AGENTGATEWAY → DESTINATION cross-module metrics — they are transparent infrastructure calls on behalf of the consumer.

Scope intentionally limited to _lob.py:
_fragments.py retains _telemetry_source=Module.AGENTGATEWAY on create_fragment_client() — fragment discovery is a distinct step and that attribution is considered correct. Aligning _fragments.py is out of scope for this PR.

Test plan

  • Verify _fetch_auth_token still resolves auth tokens correctly
  • Verify get_ias_client_id_lob still returns the client ID correctly
  • Confirm telemetry metrics for these paths no longer show source=AGENTGATEWAY

Remove _telemetry_source=Module.AGENTGATEWAY from create_destination_client
calls in _fetch_auth_token and get_ias_client_id_lob, and drop the now-unused
Module import.
@tiagoek tiagoek requested a review from a team as a code owner July 15, 2026 09:30
@tiagoek

tiagoek commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

SDK Module Review

Check Status Findings
bdd ✅ PASS 0
binding-shape ✅ PASS 0
commits ✅ PASS 0
concurrency ✅ PASS 0
constants ✅ PASS 0
deletion-hygiene ✅ PASS 0
deps-supply ✅ PASS 0
disclosure ✅ PASS 0
docs ✅ PASS 0
errors-logging ✅ PASS 0
hardcode ✅ PASS 0
http-hygiene ✅ PASS 0
license-spdx ✅ PASS 0
patterns ✅ PASS 0
pr-size ✅ PASS 0
quality-gate-parity ✅ PASS 0
secrets ✅ PASS 0
telemetry ✅ PASS 0
testing-depth ⚠️ FLAG 1
versioning ✅ PASS 0

Findings (1)

  • [FLAG] TD-01 — Bug-fix PR touches src/ but no test files changed (at tests/, no code line to anchor)

1 finding(s): 0 posted as inline comment(s) on the affected lines, 1 not tied to a code line (listed above).


Generated by sdk-review-skill · v1

@tiagoek

tiagoek commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of a PR targeting Sebastian's fork directly so he can test on top of his work.

@tiagoek tiagoek closed this Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant