-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][broker] PIP-264: Add OpenTelemetry consumer metrics #22693
[feat][broker] PIP-264: Add OpenTelemetry consumer metrics #22693
Conversation
Increment msgRedeliverCounter
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.
LGTM
var builder = Attributes.builder() | ||
.put(OpenTelemetryAttributes.PULSAR_CONSUMER_NAME, consumer.consumerName()) | ||
.put(OpenTelemetryAttributes.PULSAR_CONSUMER_ID, consumer.consumerId()) | ||
.put(OpenTelemetryAttributes.PULSAR_CONSUMER_CONNECTED_SINCE, |
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.
@merlimat @dragosvictor This and other attributes here are super high cardinality - why are we recording with them? This will "kill" any TSDB and be very costly. Even when compared with pulsar_consumer_msg_rate_out
- it didn't have all those attributes.
(cherry picked from commit e558cfe)
PIP-264
Motivation
Using OpenTelemetry, exposes the current consumer-level metrics emitted by the broker and described in the doc.
Modifications
Similar to topic metrics PR #22467, navigate all the current consumers connected to the broker and expose their respective metrics in OpenTelemetry format.
The metric details can be consulted in the doc PR: apache/pulsar-site#896. Prometheus metric
pulsar_consumer_blocked_on_unacked_messages
has been dropped in favor of OpenTelemetry boolean attributepulsar.consumer.blocked
on metricpulsar.broker.consumer.message.unack.count
, as these values are tightly related.Verifying this change
This change added tests and can be verified as follows:
org.apache.pulsar.broker.stats.OpenTelemetryConsumerStatsTest#testMessagingMetrics
, verifying all the new metrics.Does this pull request potentially affect one of the following parts:
Documentation
doc
doc-required
[feat][doc] PIP-264: Add OpenTelemetry consumer metrics reference pulsar-site#896doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: dragosvictor#24