Comments (4)
Can a MeterFilter be used for this purpose?
I guess so. Here is an example of that. Only downside I see is, is that if there is a meter filter configured after your meter filter and adds these percentiles, then you will still see the lower percentiles.
from micrometer.
You can also do two things:
- Not register any client-side percentiles and let users set them up (if you are using Spring Boot, there is a property for that that creates a
MeterFilter
) - You can use histograms so everyone can calculate whatever percentiles they want on the Prometheus server side (more expensive though)
You might also want to watch this talk and learn about why it is usually not a good idea to look at avg, median, lower percentiles in terms of latency: https://www.youtube.com/watch?v=lJ8ydIuPFeU
from micrometer.
Thanks for your reply!
Can you let me know the MeterFilter assocated SB property you're talking about.
If you can humor one more question - Our current proposed approach for pure Spring Boot is to define a config class that does Metrics.globalRegistry.config().meterFilter(percentileGuardMeterFilter)
(engaging our filter), and look for @SpringBootApplication
annotated classes or classes with main()
, and annotate to @import
this class. Do you see any overall issues with this approach. We want to target both @Timed
kinds of metrics, and those that are directly created as custom metrics into the global registry.
from micrometer.
Can you let me know the MeterFilter assocated SB property you're talking about.
Go to the Spring Boot docs, browse the Common Application Properties and search on the page for the word percentiles. Or you the search box in the top left corner.
Our current proposed approach for pure Spring Boot is to define a config class that does Metrics.globalRegistry.config().meterFilter(percentileGuardMeterFilter) (engaging our filter), and look for @SpringBootApplication annotated classes or classes with main(), and annotate to @import this class. Do you see any overall issues with this approach.
Multiple issues:
- Do not use the global (you don't need to with Spring and it can make your life hard especially for testing)
- Read the docs about how to create your own auto-configuration, if I understand it correctly, what you are about to do is very fragile (and sorry for the better word, it's a big hack). Instead of this you can write your own auto-configuration that Spring Boot will load for you without modifying any classes.
from micrometer.
Related Issues (20)
- Timed annotation should consider Transactional handling HOT 1
- Add KeyValue support for Observation.Event HOT 3
- Test duplicate stops on observations HOT 1
- Backport fix AspectJ pointcut syntax HOT 3
- Adopt Stable OTEL Semantic Conventions for JVM metrics HOT 4
- io.micrometer:micrometer-observation:1.11.5 getting error with micrometer-test with version 1.12.0-SNAPSHOT with java version 17 & 21 HOT 5
- Make measured event duration accessible from outside of DefaultMeterObservationHandler HOT 3
- process_start_time_seconds HELP description inconsistency between Prometheus and micrometer HOT 1
- Make metric export filters applicable only to Dynatrace and not Spring Boot Admin (Spring Actuator) HOT 9
- Metrics in "/actuator/prometheus" are not consistent in a multi nodes environment (kubernetes) HOT 3
- Bump org.jetbrains.kotlin.jvm from 1.9.23 to 1.9.24
- Bump org.jetbrains.kotlin.jvm from 1.9.23 to 1.9.24
- zgcGenerationalTest is flaky on CI
- Support for removing metrics registered by CaffeineCacheMetrics HOT 12
- Gauge API like counter / timer HOT 6
- Use Duration for @Timed SLOs instead of double HOT 2
- Add "cancelled" information to the GrpcServerObservationContext HOT 3
- Make PrometheusMeterRegistryTest less flaky
- Apply test-retry settings to all tests
- Upgrade opentelemetry-collector-contrib to 0.104.0
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.