Comments (2)
But in situations where the environment is only sparsely used, metrics can sit in the buffer for arbitrarily long durations.
Yes, it's possible for metrics to sit in the buffer for a while. I can't think of a good way around this that doesn't involve more complexity than the sink itself. In this case, I think the prudent thing is for users to use the UdpMetricSink
instead since they presumably don't have a lot of metrics being emitted to necessitate buffering. Where do you think a good place to document this tradeoff is? Perhaps in the docs for each of the sinks? Or the main lib docs (lib.rs + README)?
A similar (but potentially more pressing) issue is that BufferedUdpMetricSink has no way to flush the contents of its buffer when dropped, making data loss inevitable.
The BufferedUdpMetricSink
doesn't flush on drop explicitly but the underlying BufWriter
that our write adapter uses, does: https://github.com/tshlabs/cadence/blob/4edb69ca281dfbb4651d26d4266cc6c4307c5943/src/io.rs#L215
from cadence.
Glad to see the writer will flush itself.
I suppose the environmental edge case can be handled with a configuration flag, so this isn't a showstopper either. If anything, I would probably document this behavior on BufferedUdpMetricSink
, and maybe mention it in passing on the README where this type is introduced. I think that would sufficiently resolve this ticket!
from cadence.
Related Issues (20)
- Bump minimum Rust version due to Criterion deps
- Add f64 constructors to histograms and distributions
- Add tests for multiple types for each metric in cadence-macros
- Update all examples to have multiple types for each metric
- Datadog Event stream support HOT 1
- Create example of using conversion traits with custom type
- Add tags to all metrics HOT 5
- Instrumented allocator to verify heap allocations
- Remove client uses of Arc
- Remove MetricError description implementation
- Define parts of the API covered by semver
- Edition 2021 update
- Support being able to sample metrics HOT 3
- Add support for incrementing and decrementing a gauge HOT 2
- Distribution missing tags from StatsdClientBuilder HOT 3
- Support for metrics aggregation HOT 3
- Option to observe write errors HOT 4
- Expose network-level telemetry HOT 4
- Support for UDS + SOCK_STREAM ? HOT 3
- macro variants that do not panic if global default client is not set 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 cadence.