-
Notifications
You must be signed in to change notification settings - Fork 911
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 support for spring-pulsar 1.0 #13320
base: main
Are you sure you want to change the base?
Add support for spring-pulsar 1.0 #13320
Conversation
@jaydeluca Excuse me, could you kindly review this when you have some time? Thanks! |
instrumentation/spring/spring-pulsar-1.0/javaagent/build.gradle.kts
Outdated
Show resolved
Hide resolved
instrumentation/spring/spring-pulsar-1.0/javaagent/build.gradle.kts
Outdated
Show resolved
Hide resolved
...est/java/io/opentelemetry/javaagent/instrumentation/spring/pulsar/v1_0/SpringPulsarTest.java
Outdated
Show resolved
Hide resolved
...est/java/io/opentelemetry/javaagent/instrumentation/spring/pulsar/v1_0/SpringPulsarTest.java
Outdated
Show resolved
Hide resolved
...est/java/io/opentelemetry/javaagent/instrumentation/spring/pulsar/v1_0/SpringPulsarTest.java
Outdated
Show resolved
Hide resolved
instrumentation/spring/spring-pulsar-1.2/javaagent/build.gradle.kts
Outdated
Show resolved
Hide resolved
import org.apache.pulsar.client.api.Message; | ||
|
||
public final class SpringPulsarSingletons { | ||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.spring-pulsar-1.2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unnecessary definition, it's just used once in this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other instrumentations have similar INSTRUMENTATION_NAME
filed, for example
Line 18 in d45ebfa
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.spring-kafka-2.7"; |
AttributeKey.stringKey("messaging.pulsar.message.type"); | ||
|
||
protected List<AttributeAssertion> publishAttributes() { | ||
return Arrays.asList( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd use static import when it's used several time in a class. For detail, you can refer to https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/contributing/style-guideline.md#static-imports
implementation(project(":instrumentation:pulsar:pulsar-2.8:javaagent")) | ||
|
||
testInstrumentation(project(":instrumentation:pulsar:pulsar-2.8:javaagent")) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other instrumetnations also leave a blank line between dependencies in different scopes, here testInstrumentation
and testImplementation
Resolves #13309