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

Add javaagent instrumentation for ktor2 #9149

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Aug 7, 2023

Resolves #9144
Resolves #7755

@laurit laurit requested a review from a team August 7, 2023 12:15

@Override
public boolean isHelperClass(String className) {
return className.startsWith("io.opentelemetry.extension.kotlin.");
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this normally be injected by the coroutine instrumentation module? Do we need that here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is more about muzzle, if we don't tell it that these are helpers it will fail with Missing class io.opentelemetry.javaagent.shaded.io.opentelemetry.extension.kotlin.ContextExtensionsKt

laurit and others added 2 commits August 8, 2023 15:39
…elemetry/javaagent/instrumentation/ktor/v2_0/ServerInstrumentation.java

Co-authored-by: Mateusz Rzeszutek <[email protected]>
…elemetry/javaagent/instrumentation/ktor/v2_0/HttpClientInstrumentation.java

Co-authored-by: Mateusz Rzeszutek <[email protected]>
@pkgonan
Copy link

pkgonan commented Sep 19, 2023

@laurit @mateuszrzeszutek @trask
Hi.

I am using Ktor client. If I run the Java agent, it doest not extract imstrumentation automatically. How should I use it? OTEL APM does not instrument HTTP Request & Response sent by Ktor Client. I was wondering if I'm misunderstanding something and how to use it. Is this feature does not extract instrumentation automatically?

Ticket

@trask
Copy link
Member

trask commented Sep 19, 2023

hi @pkgonan! we would expect this to work, see https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md#libraries--frameworks

as @laurit requested #9501 (comment), submitting a minimal repro the best way to help us identify the issue you may be facing

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.

No http.route in Ktor framework Added KTor plugin, but tracing is being suppressed
4 participants