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 Pulsar MessagingProducerMetrics #11591

Merged
merged 12 commits into from
Jul 9, 2024
Merged

Conversation

crossoverJie
Copy link
Contributor

Add Pulsar MessagingProducerMetrics, reference message semantics.

@crossoverJie crossoverJie requested a review from a team as a code owner June 14, 2024 07:46
@@ -12,6 +12,7 @@ group = "io.opentelemetry.instrumentation"

dependencies {
api("io.opentelemetry.semconv:opentelemetry-semconv")
api("io.opentelemetry.semconv:opentelemetry-semconv-incubating")
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't add incubating semconv dependency to the libraries we publish, instead we copy the constants from the incubating semconv. The reason we do this is that incubating semconv can change in backwards incompatible way. Imagine if you have 2 libraries depending on different versions of incubating semconv, it is possible that a version of incubating semconv that works for both doesn't exist.
Using incubating semconv in javaagent and test code is fine and encouraged.

Copy link
Contributor Author

@crossoverJie crossoverJie Jun 17, 2024

Choose a reason for hiding this comment

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

thank you for the clarification.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done; please take a look. Thanks.

import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;

public class MessagingProducerMetrics implements OperationListener {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add javadoc similar to what the other Metrics classes have

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done; please take a look. Thanks.

import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;

public class MessagingProducerMetrics implements OperationListener {
Copy link
Contributor

Choose a reason for hiding this comment

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

@trask should we call this MessagingProducerMetrics or MessagingProducerExperimentalMetrics?

Copy link
Member

Choose a reason for hiding this comment

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

I think MessagingProducerMetrics is good, since all of messaging semconv is experimental still, and the duration metric will probably be included in the initial stability

crossoverJie and others added 2 commits June 17, 2024 20:33
…nstrumentation/api/incubator/semconv/messaging/MessagingMetricsAdvice.java

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
…nstrumentation/api/incubator/semconv/messaging/MessagingProducerMetrics.java

Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
crossoverJie and others added 4 commits June 17, 2024 20:35
…nstrumentation/api/incubator/semconv/messaging/MessagingProducerMetricsTest.java

Co-authored-by: Steve Rao <raozihao.rzh@alibaba-inc.com>
…nstrumentation/api/incubator/semconv/messaging/MessagingProducerMetricsTest.java

Co-authored-by: Steve Rao <raozihao.rzh@alibaba-inc.com>
@crossoverJie crossoverJie requested a review from laurit June 19, 2024 03:03
@crossoverJie crossoverJie requested a review from laurit June 21, 2024 03:02
@laurit laurit added this to the v2.6.0 milestone Jul 8, 2024
@trask trask merged commit a46c8a0 into open-telemetry:main Jul 9, 2024
56 checks passed
trask added a commit to trask/opentelemetry-java-instrumentation that referenced this pull request Jul 14, 2024
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.

None yet

4 participants