feat: Add mezmo_analytics source - #85
Conversation
38b0cbb to
807b700
Compare
| [features] | ||
| default = [] | ||
| lua = ["dep:mlua", "dep:tokio-stream", "vrl/lua"] | ||
| lua = ["dep:mlua", "vrl/lua"] |
There was a problem hiding this comment.
tokio-stream is no longer optional
a4e20ae to
95c7012
Compare
There was a problem hiding this comment.
mostly relocation of the previous store::save_in_loop implementation.
The main changes here are:
- Create analytic batches for the newly added source and publish them
- Aggregation continues even if there is not DB connection (ensures data is served to the source)
95c7012 to
ead8440
Compare
The source collects internally generated data including usage metrics, usage annotations and log cluster events. The source emits each event as a separate output, ensuring we can route to specific destinations appropriately. The implementation allows us to setup a source to collect and route data to Pulsar. Ref: LOG-23218
ead8440 to
782b4bd
Compare
Greptile SummaryThe PR adds a multi-output source that exports internally generated usage and log-clustering analytics for downstream routing.
|
| Filename | Overview |
|---|---|
| lib/vector-core/src/mezmo/analytics.rs | Adds global per-output broadcast channels and subscriptions; lagged receivers still permanently lose unread analytics batches. |
| src/sources/mezmo_analytics/config.rs | Registers the source and all five outputs, but every configured instance still subscribes to the same global event streams. |
| src/sources/mezmo_analytics/mod.rs | Concurrently forwards analytics batches to their named source outputs. |
| lib/vector-core/src/usage_metrics/mod.rs | Converts aggregated billing and annotation usage into analytics log events before existing flushes. |
| src/transforms/mezmo_log_clustering/aggregate.rs | Aggregates log-clustering data and emits cluster, sample, and usage batches alongside database persistence. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
UM[Usage metrics aggregation] --> PUB[Global analytics publishers]
LC[Log clustering aggregation] --> PUB
PUB --> U[usage_metrics]
PUB --> A[usage_metrics_by_annotations]
PUB --> C[log_clusters]
PUB --> S[log_cluster_samples]
PUB --> G[log_cluster_usage]
U --> MA[mezmo_analytics source]
A --> MA
C --> MA
S --> MA
G --> MA
MA --> DS[Downstream pipelines and Pulsar]
Reviews (2): Last reviewed commit: "chore: Emit standard vector internal eve..." | Re-trigger Greptile
Emit events for dropped data Ref: LOG-24349
Adds a new multi output source (
mezmo_analytics) which collects internally generated events for routing through pipelines.The source exposes outputs for
usage metrics,usage metrics by annotations,log clusters,log cluster samplesandlog cluster annotations.The source will be used to egress the internal events to Pulsar. The direct DB write paths will be deprecated as part of the Timescale shutdown.
Ref: LOG-23218
Summary
Vector configuration
How did you test this PR?
Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
Notes
@vectordotdev/vectorto reach out to us regarding this PR.pre-pushhook, please see this template.make fmtmake check-clippy(if there are failures it's possible some of them can be fixed withmake clippy-fix)make testgit merge origin masterandgit push.Cargo.lock), pleaserun
make build-licensesto regenerate the license inventory and commit the changes (if any). More details here.