Comments (6)
Thanks for the quick response. We'll aim to get this included in 1.14 then.
from micrometer.
Thanks for opening the issue. I think you're the first person to ask for it, but we could certainly consider this enhancement. Not directly related to what you mentioned, but another consideration is that our MongoDB client instrumentation still doesn't use the Observation
API (see the docs if you're not familiar). I think we'd like to have an instrumentation of the MongoDB client that does, but we need to check whether such instrumentation would be hosted in the Micrometer repo (as the current instrumentation is) or if it will be in the MongoDB client repo.
Also note if you're using Spring Data MongoDB, that has its own instrumentation based on the Observation API; see their docs.
from micrometer.
@shakuzen thanks for the quick reply, I am aware of the observation offered by spring data for the mongo commands, but it appears a bit cumbersome at the moment. Compared to the spring data repository observation, the one for commands is not capable of extending the DefaultMongoHandlerObservationConvention
to easily customize the tags, because it is package private, rather one should copy&paste the content and implement directly GlobalObservationConvention<MongoHandlerContext>
to be able to be added to the ObservationRegistryCustomizer
. This was probably addressed in this issue.
Maybe we can wait for Spring boot to pick it
Spring Data MongoDB currently has the most up-to-date code to support Observability in your MongoDB application. These changes, however, havenβt been picked up by Spring Boot (yet)
Overall the whole configuration is a bit awkward, whereas the DefaultMongoCommandTagsProvider
is just working out of the box, just without the exception ;)
from micrometer.
@shakuzen do you think it can go into 1.13.0 by 13 of May?
Since it only requires:
Tag.of("exception", (event instanceof CommandFailedEvent failed) ? getExceptionName(failed.getThrowable()) : "none")
or
Tag.of("error", (event instanceof CommandFailedEvent failed) ? getExceptionName(failed.getThrowable()) : "none")
depending on which convention you are following
by having such helper methods e.g.
private String getExceptionName(Throwable error) {
return this.getSimpleClassName(error.getClass());
}
private String getSimpleClassName(Class<?> type) {
String simpleName = type.getSimpleName();
return !StringUtils.hasText(simpleName) ? type.getName() : simpleName;
}
from micrometer.
do you think it can go into 1.13.0 by 13 of May?
Typically, we would not merge enhancements for a feature release after a release candidate has been made available. 1.13.0-RC1 is already out. The proposed change sounds low risk enough, but the workaround - provide your own tags provider extending the default one - is also easy enough. Could you not use a custom tags provider until 1.14.0 if we included this enhancement there? Would you also be interested in contributing a pull request for this?
from micrometer.
Thanks for letting me know, I agree with you and there is no urgency for 1.13, it was just an informational question. As of the PR contribution, currently I am not able to involve myself on that level π
from micrometer.
Related Issues (20)
- When using KafkaMessageDrivenChannelAdapter with tracing it fails HOT 2
- Cancelled status code not reported in the gRPC server metrics HOT 2
- Introducing breaking changes in MINOR version HOT 2
- Add KeyValuesProvider HOT 1
- 1.12.5 java.lang.NoClassDefFoundError: org/HdrHistogram/DoubleRecorder HOT 2
- [question] about prometheus client 1.x doc HOT 1
- Instrumented Java 11 HttpClient does not re-throw exceptions in sendAsync call
- Screen out / deny histogram registrations on certain percentile ranges HOT 4
- Speedup operations on `Tags`.
- Possible concurrency problems HOT 5
- Inconsistenty in JVM TimedExecutors "executionTimer" HOT 1
- Prometheus ClassCastException while scraping (Micrometer 1.13 / SB 3.3) HOT 4
- Disable kotlinSourcesJar since it conflicts with sourcesJar HOT 5
- Publish recent documentation under a fixed version number HOT 4
- Introduce Metric Filtering for CloudWatch Integration HOT 1
- Spring Boot with Kafka Template with supplied tags provider breaks spring_kafka_template metric
- Metric will be skipped when producing scrape output for PrometheusMeterRegistry HOT 9
- Fix histogram consistency in PrometheusMeterRegistry HOT 7
- ClassCastException io.prometheus.metrics.model.snapshots.HistogramSnapshot$HistogramDataPointSnapshot vs io.prometheus.metrics.model.snapshots.SummarySnapshot$SummaryDataPointSnapshot when scraping two PrometheusTimers, one with publishPercentile, the other one without after upgrade to Micrometer 1.13 HOT 3
- Timer metrics - not able to see _seconds_count and _seconds_sum metrics, _max metric is getting scrap HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micrometer.