Skip to content

Accept custom interceptors in ConfigClient and AsyncConfigClient - #105

Merged
zeevdr merged 2 commits into
mainfrom
feat/custom-interceptors
May 25, 2026
Merged

zeevdr merged 2 commits into
mainfrom
feat/custom-interceptors

Conversation

@zeevdr

@zeevdr zeevdr commented May 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Enables injection of custom gRPC interceptors (logging, tracing, metrics) without monkeypatching either client
  • For ConfigClient, user interceptors are placed outermost in the grpc.intercept_channel chain so they wrap around the SDK's internal auth interceptor
  • For AsyncConfigClient, interceptors are forwarded to the grpc.aio channel constructor

Test plan

  • ConfigClient: custom interceptor appears in intercept_channel call args
  • ConfigClient: user interceptors are ordered before AuthInterceptor (outermost)
  • ConfigClient: custom interceptors work when no auth metadata is configured
  • AsyncConfigClient: interceptors kwarg forwarded to create_aio_channel
  • AsyncConfigClient: None default when no interceptors provided
  • AsyncConfigClient: multiple interceptors preserved in order
  • All 252 existing tests still pass, 97.53% coverage

Closes #68

…figClient

Both clients now accept an optional `interceptors` list for injecting
logging, tracing, or metrics interceptors without monkeypatching.

For ConfigClient, user-supplied interceptors are placed outermost in the
grpc.intercept_channel chain (before the internal AuthInterceptor).
For AsyncConfigClient, interceptors are forwarded to the grpc.aio channel
constructor.

Closes #68

Co-Authored-By: Claude <[email protected]>
@zeevdr zeevdr added this to the Beta Readiness milestone May 25, 2026
@zeevdr zeevdr added size: S Quick win — a few hours or less priority: P2 Nice-to-have labels May 25, 2026
@codecov

codecov Bot commented May 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@zeevdr
zeevdr merged commit 073a514 into main May 25, 2026
13 checks passed
@zeevdr
zeevdr deleted the feat/custom-interceptors branch May 25, 2026 15:24
@github-project-automation github-project-automation Bot moved this from Todo to Done in OpenDecree May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: P2 Nice-to-have size: S Quick win — a few hours or less

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Accept custom interceptors in ConfigClient / AsyncConfigClient

1 participant