Skip to content

Batch package telemetry events into a single OpenSearch bulk request#4684

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
batchTelemetry
May 4, 2026
Merged

Batch package telemetry events into a single OpenSearch bulk request#4684
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
batchTelemetry

Conversation

@GabrielDuf
Copy link
Copy Markdown
Contributor

  • Package telemetry events (install, update, uninstall, download, details) are now queued in-memory and flushed as a single /_bulk NDJSON request instead of one HTTP request per event.

  • Flush is triggered by a new AbstractOperation.QueueDrained static event, which fires whenever the last running operation exits its queue. This means a burst of 30 package updates produces exactly one HTTP request, fired as soon as the last operation finishes — no fixed timer.

  • Added TelemetrySerializerContext.BulkTrimming (compact, non-indented JSON) required by the OpenSearch bulk API.

  • FlushPackageEventsAsync() is public for explicit calls from tests.

  • QueueDrained is wired in both the Avalonia and WinUI bootstrappers.

@GabrielDuf Gabriel Dufresne (GabrielDuf) merged commit 5a0bbf1 into main May 4, 2026
9 checks passed
@GabrielDuf Gabriel Dufresne (GabrielDuf) deleted the batchTelemetry branch May 4, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants