[feat][monitor] Add ML write latency histogram and entry size histogram as OTel metrics#24815
Merged
codelipenghui merged 1 commit intoapache:masterfrom Oct 8, 2025
Conversation
Contributor
Author
|
Note: Here is an example. import com.google.auto.service.AutoService;
import io.opentelemetry.sdk.autoconfigure.spi.AutoConfigurationCustomizer;
import io.opentelemetry.sdk.autoconfigure.spi.AutoConfigurationCustomizerProvider;
import io.opentelemetry.sdk.metrics.Aggregation;
import io.opentelemetry.sdk.metrics.InstrumentSelector;
import io.opentelemetry.sdk.metrics.View;
import java.util.Arrays;
@AutoService(AutoConfigurationCustomizerProvider.class)
public class MyCustomizerProvider implements AutoConfigurationCustomizerProvider {
@Override
public void customize(AutoConfigurationCustomizer customizer) {
customizer.addMeterProviderCustomizer(((sdkMeterProviderBuilder, configProperties) -> {
sdkMeterProviderBuilder.registerView(InstrumentSelector.builder()
.setName("pulsar.broker.topic.publish.latency").build(),
View.builder()
.setAggregation(Aggregation.explicitBucketHistogram(Arrays.asList(0.001, 30.0))).build());
return sdkMeterProviderBuilder;
}));
}
}ref.
|
lhotari
reviewed
Oct 6, 2025
...ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpenTelemetryManagedLedgerStats.java
Show resolved
Hide resolved
f65a473 to
14d025c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #24815 +/- ##
=============================================
+ Coverage 36.04% 74.25% +38.20%
- Complexity 13055 33403 +20348
=============================================
Files 1855 1912 +57
Lines 144926 149140 +4214
Branches 16814 17300 +486
=============================================
+ Hits 52243 110741 +58498
+ Misses 85439 29556 -55883
- Partials 7244 8843 +1599
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
14d025c to
08617a2
Compare
Contributor
Author
|
Rebased to the master to resolve conflicts. |
codelipenghui
approved these changes
Oct 8, 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: #21080
Motivation
Please see the PIP-264 doc.
ref.
Modifications
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
pulsar.broker.managed_ledger.message.outgoing.latencypulsar.broker.managed_ledger.message.outgoing.ledger.latencypulsar.broker.managed_ledger.ledger.switch.latencypulsar.broker.managed_ledger.entry.sizeDocumentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: equanz#14