Skip to content

Add databricks-impulse into SDK and Spark Connect channel user-agents - #94

Merged
tombonfert merged 4 commits into
mainfrom
feature/spark_connect_telemetry_attribution
Sep 9, 2026
Merged

Add databricks-impulse into SDK and Spark Connect channel user-agents#94
tombonfert merged 4 commits into
mainfrom
feature/spark_connect_telemetry_attribution

Conversation

@tombonfert

@tombonfert tombonfert commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Tags Impulse's product identity onto both the SDK user-agent and the Spark Connect gRPC channel

Test Plan

  • Unit tests added/updated
  • Manual testing completed
  • Documentation updated (if applicable)

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No new linter warnings introduced

…g Spark Connect sessions

- Register `databricks-impulse` in the Databricks SDK process-global user-agent
  when the package is imported, guarded so import never fails.
- Add `tag_spark_connect_user_agent()` to prepend the product/version tag to
  external Spark Connect sessions via their private channel-builder params.
- Wire the Spark Connect tagging into `telemetry_logger` so methods that
  receive a `spark` argument attribute their compute automatically.
- Add unit tests for global registration, idempotent Spark Connect tagging,
  classic-session no-op behavior, and decorator integration.
- Register SDK user-agent extra before product and log debug info when registration fails.
- Match Spark Connect user-agent tags by product prefix so version substrings (e.g. 0.6.1 vs 0.6.10) cannot false-match.
- Guard telemetry decorator signature binding so binding errors never break the wrapped business call.
- Make import registration test deterministic by reloading the package in-body.
@tombonfert
tombonfert requested a review from a team as a code owner September 9, 2026 06:12
@tombonfert tombonfert changed the title Log telemetry of external Spark Connect usage of Impulse Add databricks-impulse into SDK and Spark Connect channel user-agents Sep 9, 2026
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.38%. Comparing base (86b5958) to head (044d3e3).

Files with missing lines Patch % Lines
src/impulse_query_engine/telemetry.py 90.47% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #94   +/-   ##
=======================================
  Coverage   89.37%   89.38%           
=======================================
  Files          62       62           
  Lines        5544     5565   +21     
  Branches      680      682    +2     
=======================================
+ Hits         4955     4974   +19     
- Misses        466      468    +2     
  Partials      123      123           
Flag Coverage Δ
query_engine 85.86% <90.47%> (+0.03%) ⬆️
reporting 94.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/impulse_query_engine/telemetry.py 92.30% <90.47%> (-1.25%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tombonfert
tombonfert merged commit fe9a514 into main Sep 9, 2026
6 checks passed
@tombonfert
tombonfert deleted the feature/spark_connect_telemetry_attribution branch September 9, 2026 07:10
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.

1 participant