Repository navigation
[feat][broker] PIP-264: Add OpenTelemetry consumer metrics - #22693
Merged
merlimat merged 22 commits intoMay 10, 2024
Merged
Conversation
Increment msgRedeliverCounter
merlimat
approved these changes
May 10, 2024
asafm
reviewed
May 25, 2024
| var builder = Attributes.builder() | ||
| .put(OpenTelemetryAttributes.PULSAR_CONSUMER_NAME, consumer.consumerName()) | ||
| .put(OpenTelemetryAttributes.PULSAR_CONSUMER_ID, consumer.consumerId()) | ||
| .put(OpenTelemetryAttributes.PULSAR_CONSUMER_CONNECTED_SINCE, |
Contributor
There was a problem hiding this comment.
@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.
3 of 15 tasks
lhotari
pushed a commit
that referenced
this pull request
Jun 7, 2024
(cherry picked from commit e558cfe)
1 of 2 tasks
hanmz
pushed a commit
to hanmz/pulsar
that referenced
this pull request
Feb 12, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_messageshas been dropped in favor of OpenTelemetry boolean attributepulsar.consumer.blockedon 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
docdoc-required[feat][doc] PIP-264: Add OpenTelemetry consumer metrics reference pulsar-site#896doc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: dragosvictor#24