Comments (6)
@jonatan-ivanov I have just created the following issue #5301
from micrometer.
It works for me, cancellations in webflux are defined using connectionAborted
.
from micrometer.
Observing the behavior of cancel, it seems the status code doesn't change even if the request is canceled.
Instead, the ServiceCall#isCancelled
returns true
for canceled requests.
So, I'm inclined to add GrpcServerObservationContext#isCancelled
, which becomes a low cardinality tag, to indicate whether the request has been canceled or not, then keep the existing status code unchanged.
from micrometer.
With the soluction provided, it creates a new event with status cancelled but it could be useful to add the cancel information to the GrpcServerObservationContext which is used to retrieve the timer metric.
The same behavior is resolved in webflux adding a boolean at ServerRequestObservationContext
from micrometer.
You mean you simply want this info added to the context even if it is not used here so that you can create an ObservationFilter
or an ObservationHandler
and use it?
Or do you want the instrumentation also add a low cardinality key-value about the fact of the cancellation (that can also mean removing the event)?
Either case, could you create a new issue and explain what you want and how you want to use this information?
I think right now you can hack this: it's not great but you can create an ObservationHandler
that receives the cancellation event (onEvent
) method and reacts to that (e.g.: sets a field/keyvalue on the context, etc).
from micrometer.
You mean you simply want this info added to the context even if it is not used here so that you can create an
ObservationFilter
or anObservationHandler
and use it?Or do you want the instrumentation also add a low cardinality key-value about the fact of the cancellation (that can also mean removing the event)?
I think that both would be helpful. On the one hand, we want to differentiate that the timer metric generated has been cancelled. And on the other hand, we have a custom GrpcServerObservationConvention
to add extra information, which would be helpful to know if the request has been cancelled.
And yes, at least in our case, the event would have no sense.
Either case, could you create a new issue and explain what you want and how you want to use this information?
Perfect!
I think right now you can hack this: it's not great but you can create an
ObservationHandler
that receives the cancellation event (onEvent
) method and reacts to that (e.g.: sets a field/keyvalue on the context, etc).
I will explore it, thanks for the suggestion!
from micrometer.
Related Issues (20)
- Apply test-retry settings to all tests
- Upgrade opentelemetry-collector-contrib to 0.104.0
- Value from environment variable `OTEL_EXPORTER_OTLP_ENDPOINT` is not being used HOT 2
- Add a metric for tracking heap size after last gc event HOT 2
- Migrate to io.spring.develocity.conventions:0.0.19
- Spring Boot 3.x Micrometer StatsD registry does not send metrics to UDP port when another StatsD client is active on the same port
- Excessive TLAB memory allocations from MetricsTurboFilter HOT 2
- Memory leak is suspected when searching meters in MeterRegistry HOT 4
- Metrics not collected after ExecutorService recreation
- Bump jersey3 from 3.0.4 to 3.0.12
- Bump jersey3 from 3.0.11 to 3.0.12
- Bump jersey3 from 3.0.11 to 3.0.12
- Bump jersey3 from 3.0.11 to 3.0.12
- Document ExponentialHistogram support in OTLP registry
- Add docs for ObservationValidator
- ObservationValidator fails with NullObservation
- The signature of MultiGauge.register should be Iterable<? extends Row<?>>
- Possibility to have non shadowed netty and reuse the dependency HOT 1
- Exponential Histogram should include minimumExpectedValue in positive buckets
- BOM contains a non-resolvable dependency: io.micrometer:concurrency-tests
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.