-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate ktor 2.0 client and server instrumentation (open-telemetry#1…
- Loading branch information
1 parent
e5eba98
commit 5e002c5
Showing
2 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...io/opentelemetry/javaagent/instrumentation/ktor/v2_0/KtorClientInstrumentationModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.instrumentation.ktor.v2_0; | ||
|
||
import static java.util.Collections.singletonList; | ||
|
||
import com.google.auto.service.AutoService; | ||
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule; | ||
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation; | ||
import java.util.List; | ||
|
||
@AutoService(InstrumentationModule.class) | ||
public class KtorClientInstrumentationModule extends InstrumentationModule { | ||
|
||
public KtorClientInstrumentationModule() { | ||
super("ktor", "ktor-client", "ktor-2.0", "ktor-client-2.0"); | ||
} | ||
|
||
@Override | ||
public boolean isHelperClass(String className) { | ||
return className.startsWith("io.opentelemetry.extension.kotlin."); | ||
} | ||
|
||
@Override | ||
public List<TypeInstrumentation> typeInstrumentations() { | ||
return singletonList(new HttpClientInstrumentation()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters