Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support instrumentation for jsonrpc4j #13008

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

chenlujjj
Copy link

@chenlujjj chenlujjj commented Jan 7, 2025

To resolve: #6020

The instrumentation is for both server and client:

  • server: set JsonRpcServer's invocationListener as an instance of OpenTelemetryJsonRpcInvocationListener
  • client: transform the invoke method of both JsonRpcHttpClient and JsonRpcRestClient

I'm new to this repository, so I borrowed the implementation of grpc and http client instrumentation

@chenlujjj chenlujjj requested a review from a team as a code owner January 7, 2025 10:45
@chenlujjj chenlujjj marked this pull request as draft January 7, 2025 10:45
@chenlujjj chenlujjj force-pushed the feat/jsonrpc-instrumentation branch 4 times, most recently from 55628cf to b605e52 Compare January 7, 2025 15:43
@chenlujjj chenlujjj force-pushed the feat/jsonrpc-instrumentation branch from b605e52 to 0190c13 Compare January 7, 2025 15:59
@chenlujjj
Copy link
Author

Hello @trask , could you please take a look when you have time?
I'm not quite sure the implementation is in the right way, so I guess an early review can be beneficial before everything is ready.

I'm also working on the testing.

Comment on lines 22 to 28
tasks {
test {
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
jvmArgs("-Dotel.javaagent.experimental.thread-propagation-debugger.enabled=false")
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
}
}
Copy link

Choose a reason for hiding this comment

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

I don't think this is necessary.

Copy link
Author

Choose a reason for hiding this comment

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

need to keep jvmArgs("-Dotel.javaagent.experimental.thread-propagation-debugger.enabled=false"), otherwise the test would fail due to "detect context leak".
the other two settings can be removed.

@chenlujjj chenlujjj force-pushed the feat/jsonrpc-instrumentation branch from ee68060 to 6f50140 Compare January 8, 2025 12:19
Copy link
Contributor

@steverao steverao left a comment

Choose a reason for hiding this comment

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

@chenlujjj chenlujjj force-pushed the feat/jsonrpc-instrumentation branch from 8e9b228 to a54e28c Compare January 9, 2025 05:07
@github-actions github-actions bot requested a review from theletterf January 9, 2025 05:08
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.

Add support for jsonrpc4j
3 participants