Skip to content

JBAI-19233 Split tracing of the LLM clients' OkHttp handlers#177

Draft
Vladislav0Art wants to merge 8 commits intomainfrom
vartiukhov/refactoring/move-okhttp-tracing-into-new-module
Draft

JBAI-19233 Split tracing of the LLM clients' OkHttp handlers#177
Vladislav0Art wants to merge 8 commits intomainfrom
vartiukhov/refactoring/move-okhttp-tracing-into-new-module

Conversation

@Vladislav0Art
Copy link
Copy Markdown
Collaborator

@Vladislav0Art Vladislav0Art commented Jan 26, 2026

Description

  1. Moved okhttp-related components (i.e., okhttp instrument, OpenTelemetryOkHttpInterceptor, patchOpenAICompatibleClient, utility patchInterceptors) into a newly created module tracing:okhttp (split these components into several files).
  2. Moved Ktor-/okhttp-related extension functions into tracing:ktor and tracing:okhttp modules, respectively.
  3. Updated imports and deps of the LLM providers.

Closes: JBAI-19233 Split tracing of the LLM clients' OkHttp handlers, similar to how Ktor is implemented?

Important Notes

Right now, tracing:core still has dependencies on both Ktor and OkHttp libraries! It's so because we use ktor.http.ContentType, some other Ktor and OkHttp components throughout the entire modules (e..g, LangfuseExporterConfig uses Ktor's HTTP module). I tried to remove both dependencies completely, but it requires a lot of effort (e.g., we need to implement custom ContentType, MediaType, HttpHeaders, and more).

If we plan to eradicate HTTP-specific dependencies from the tracing:core, it should be done step-by-step and into several PRs.

This PR only splits okhttp tracing-related functionalities into a separate module; nothing more.

@Vladislav0Art Vladislav0Art marked this pull request as ready for review January 26, 2026 15:42
@Vladislav0Art Vladislav0Art force-pushed the vartiukhov/refactoring/move-okhttp-tracing-into-new-module branch from f5cab7d to fe77019 Compare January 26, 2026 15:47
@Vladislav0Art Vladislav0Art requested review from agbragin, georgiizorabov and slawa4s and removed request for agbragin January 26, 2026 15:47
@Vladislav0Art Vladislav0Art force-pushed the vartiukhov/refactoring/move-okhttp-tracing-into-new-module branch from fe77019 to b562fcf Compare January 29, 2026 14:29
@Vladislav0Art
Copy link
Copy Markdown
Collaborator Author

Vladislav0Art commented Feb 4, 2026

State: postponed for now in favor of major refactoring (PR) and further removal of dependencies on the Ktor module (PRs are tbd).

@Vladislav0Art Vladislav0Art marked this pull request as draft February 5, 2026 12:19
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