Skip to content

Conversation

@cbrewster
Copy link
Member

Why

We'd like to see river spans, this adds support for a basic interceptor framework, this let's us build layers for tracings, metrics, and logging.

What changed

  • Add ClientInterceptor abstract base class to define the interceptor interface
    • Each interceptor calls the next interceptor (or the actual underlying procedure). This gives it a change to look at both inputs and outputs.
  • Added OpenTelemetryClientInterceptor which provides spans for all procedure calls

Test plan

  • Wire up the otel interceptor to your application
  • You should see pid2 spans show up!

@cbrewster
Copy link
Member Author

cbrewster commented Nov 15, 2024

Current dependencies on/for this PR:

This comment was autogenerated by Freephite.

@cbrewster cbrewster requested a review from a team as a code owner November 15, 2024 23:57
@cbrewster cbrewster requested review from masad-frost and removed request for a team November 15, 2024 23:57
@cbrewster cbrewster marked this pull request as draft November 15, 2024 23:58
@cbrewster cbrewster force-pushed the 11-15-Implement_interceptors_to_support_OTel_tracing branch from 87c1210 to edf77b9 Compare November 15, 2024 23:59
@cbrewster
Copy link
Member Author

Can hold off until #106 lands

@cbrewster cbrewster force-pushed the 11-15-Implement_interceptors_to_support_OTel_tracing branch 3 times, most recently from ba65d56 to eabb561 Compare November 16, 2024 00:20
@cbrewster cbrewster force-pushed the 11-15-Implement_interceptors_to_support_OTel_tracing branch from eabb561 to 527fd16 Compare November 16, 2024 00:31
procedureName: Optional[str] = None
streamId: str
controlFlags: int
tracing: Optional[PropagationContext] = None
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to get around to populating these fields so we can get traces across client/server boundary

@cbrewster cbrewster closed this Nov 21, 2024
cbrewster added a commit that referenced this pull request Nov 21, 2024
Why
===

Supercedes #110, we want to punt desingin interceptors until later.

We'd like to have tracing between client and server, this implements
spans for the client side.

What changed
============

- Add tracing spans for each procedure call
- Add support for propagating the tracing context to the river server
using the tracing field of the transport message
- Ideally the trasnsport message wouldn't hardcode the tracing fields,
but we'd need to fix that in the JS implementation

Test plan
=========

- Connect this up to our internal usage, we should see spans for river
procedure calls
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.

2 participants