Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Chris Sidi <hashtagchris@github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Chris Sidi <hashtagchris@github.com>
Signed-off-by: Nour Douffir <nourdouf@github.com>
Signed-off-by: Nour Douffir <nourdouf@github.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Nour Douffir <nourdouf@github.com>
Signed-off-by: Nour Douffir <nourdouf@github.com>
Signed-off-by: Nour Douffir <nourdouf@github.com>
|
Downstream batching compatibility note: The redesigned batching implementation in #12374 has been materialized on a clean branch based directly on this PR's head
The batching-only diff applies with zero fuzz on top of this metrics patch, the stacked Fluent Bit tree builds, and focused payload-metrics/batching/retry/persistence/WAL tests pass (5 passed). Packaging should keep this ordering: request metrics first, batching second. The batching layer retains these two histogram families unchanged and adds separate fixed-cardinality lifecycle metrics for buffered delivery. |
|
Stacked-branch update: the batching-on-metrics head is now |
Summary
Add request payload metrics to
out_azure_logs_ingestionwithout changing request formatting, delivery, retry, timeout, or acknowledgement behavior.The metrics are recorded immediately before each call to
flb_http_do(), so they represent actual client-side HTTP attempts, including retries.Metrics
Uncompressed payload size
Histogram containing the size of the formatted JSON payload before compression.
HTTP payload size
Histogram containing the actual HTTP request-body size:
Both histograms have these labels:
name: Fluent Bit output instance or alias;dcr_id: Azure Data Collection Rule immutable ID.Bucket boundaries include 200 KiB, 900,000 bytes, and 1 MiB, and extend through 16 MiB for visibility into oversized requests.
Metric initialization is best-effort. If metric allocation fails, the output logs a warning and continues sending logs.
Request rate
The HTTP histogram's
_countseries increments once per HTTP attempt. Request-attempt rate can be calculated with:Compression ratio
The weighted compression ratio is the ratio between the HTTP and uncompressed histogram sums:
For example, a value of
0.12means the HTTP request bodies are 12% of the original JSON size. Ratios above1.0are valid for small payloads where the gzip envelope adds bytes.Validation
v5.1.1andv5.1.2.The integration test covers a compressed request, a deterministic HTTP 500 retry followed by success, DCR labels, histogram counts and sums, compression-ratio derivation, and the 200 KiB bucket.