-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feat][monitor] Add ML write latency histogram and entry size histogram as OTel metrics #24815
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][monitor] Add ML write latency histogram and entry size histogram as OTel metrics #24815
Conversation
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.
|
...ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpenTelemetryManagedLedgerStats.java
Show resolved
Hide resolved
f65a473
to
14d025c
Compare
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
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
Rebased to the master to resolve conflicts. |
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.latency
pulsar.broker.managed_ledger.message.outgoing.ledger.latency
pulsar.broker.managed_ledger.ledger.switch.latency
pulsar.broker.managed_ledger.entry.size
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: equanz#14