[feat][broker] PIP-264: Add OpenTelemetry producer metrics - #22882
Merged
heesung-sohn merged 24 commits intoJun 15, 2024
Conversation
dragosvictor
marked this pull request as ready for review
June 7, 2024 23:52
heesung-sohn
approved these changes
Jun 12, 2024
hanmz
pushed a commit
to hanmz/pulsar
that referenced
this pull request
Feb 12, 2025
Demogorgon314
pushed a commit
to Demogorgon314/kop
that referenced
this pull request
Apr 15, 2026
…osition implementation for compaction (streamnative#606) ### Motivation apache/pulsar#22891 introduces some changes for the PositionImpl. Now we need to use the Position interface instead of the PositionImpl. ### Modifications - Refactor to use Position instead of PositionImpl - apache/pulsar#22572 uses `getLastDispatchablePosition` instead of `getMaxPosition` to return the last message id, this patch implements the new method for `KopPersistentTopic`. - apache/pulsar#22838 changed the result for `checkTopicExists`. This PR also adapts to changes. - apache/pulsar#22882 removed the method `org.apache.pulsar.broker.service.Producer.updateRates(int numOfMessages, long msgSizeInBytes)`. We need to use `producer.getStats().recordMsgIn` instead. --------- Co-authored-by: Yunze Xu <xyzinfernity@163.com>
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
Adds producer related metrics to the OpenTelemetry pipeline.
Modifications
Producer#msgIn,Producer#chunkedMessageRateandProducer#msgDrop) from theProducerclass toPublisherStatsImplandNonPersistentPublisherStatsImpl, for a cleaner design.Rate.totalValueAdderkeeping track of cumulative values added to the Rate, further simplifying the design.Verifying this change
This change added tests and can be verified as follows:
OpenTelemetryProducerStatsTestDoes this pull request potentially affect one of the following parts:
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: dragosvictor#25