-
Notifications
You must be signed in to change notification settings - Fork 16
feat: add an Aggregator for Traces and Stats #534
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
Conversation
method to remove the boilerplate to start a trace agent, and only return the flushers, channel, and processor
from `manual_flush` to `flush` and `flush` to `send`
its `3.2` MB
generic `prost::Message` aggregator which batches given a `max_content_size_bytes`
a flusher should only flush, not receive messages, we abstract that from here
now the `TraceAgent` spins up a task which receives the stats so that they get properly aggregated
also modify the existing aggregator to be a stats agregator
also modified the naming import for `StatsFlusher`
it doesnt need the flushers to work, so removing that from it, and spawning own tasks for the data channels
it seems adding `prost::Message` import allows us to have the methods directly from the message we are treating with
| trace_aggregator: Arc<Mutex<trace_aggregator::TraceAggregator>>, | ||
| trace_processor: Arc<dyn trace_processor::TraceProcessor + Send + Sync>, | ||
| trace_flusher: Arc<dyn trace_flusher::TraceFlusher + Send + Sync>, | ||
| stats_aggregator: Arc<Mutex<stats_aggregator::StatsAggregator>>, |
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.
these types are becoming a pain to handle. Can we start using type aliases?
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.
Maybe? We'd have to define them at the top for all of them, maybe not in this PR.
| buffer: Vec<SendData>, | ||
| } | ||
|
|
||
| impl Default for TraceAggregator { |
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.
all this file is duplicate of trace stats aggregator, maybe dedup?
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.
Not really, this one has a different type, and they have different ways of handling how the data is treated.
Trace payload the length in the struct, whereas Stats Payload is a proto where we use method from the trait Message to get the length of the payload.
What?
Adds aggregators for Traces and Stats.
Motivation
Large trace payloads are being dropped, because they're rejected by the backend.
Also SVLS-6250
Test