Skip to content

[SDTEST-3772] Implement TelemetryExporter#266

Merged
ypopovych merged 1 commit into
mainfrom
yehor.popovych/sdtest-3772-telemetry-exporter
Jun 1, 2026
Merged

[SDTEST-3772] Implement TelemetryExporter#266
ypopovych merged 1 commit into
mainfrom
yehor.popovych/sdtest-3772-telemetry-exporter

Conversation

@ypopovych

@ypopovych ypopovych commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds TelemetryExporter — a file-backed batching exporter that writes telemetry items to disk and uploads them as message-batch envelopes via TelemetryApi
  • Refactors internal wire types (TelemetryMetric, TelemetryLog.Logs, TelemetryAppStarted/Heartbeat/Closing, TelemetryMessageBatch) into public Codable structs conforming to a new TelemetryPayload protocol; replaces the old TelemetryBatchItem enum
  • Cleans up ClosureDataUploader / DataUploadStatus to use typed APICallError throws throughout; extends MockBackend with /api/v2/apmtelemetry endpoint and waitForTelemetry() helper

Test plan

  • TelemetryExporterTests/testExportMetrics_uploadsWellFormedEnvelope — single metric item produces a valid message-batch envelope
  • TelemetryExporterTests/testExportLogs_uploadsWellFormedEnvelope — single log item produces a valid envelope
  • TelemetryExporterTests/testExportMultipleItems_batchedInOneFile_uploadedAsOneEnvelope — multiple items written to one file are batched into a single upload
  • TelemetryExporterTests/testExportMultipleItems_acrossSeparateFiles_eachUploadedIndependently — items written to separate files produce independent uploads
  • Full EventsExporter test suite passes with no regressions

Jira: SDTEST-3772

🤖 Generated with Claude Code

Adds TelemetryExporter — a file-backed batching exporter that serialises
telemetry items to disk and uploads them as message-batch envelopes via
TelemetryApi. Refactors the internal wire types (TelemetryMetric,
TelemetryLog.Logs, TelemetryAppStarted/Heartbeat/Closing,
TelemetryMessageBatch) into public Codable structs that conform to a new
TelemetryPayload protocol. Cleans up ClosureDataUploader / DataUploadStatus
to use typed APICallError throws throughout, and extends MockBackend with
an /api/v2/apmtelemetry endpoint and waitForTelemetry() helper.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@ypopovych
ypopovych requested review from a team as code owners June 1, 2026 13:48
@ypopovych
ypopovych requested a review from anmarchenko June 1, 2026 13:57
@ypopovych
ypopovych merged commit 4c0c7fd into main Jun 1, 2026
12 checks passed
@ypopovych
ypopovych deleted the yehor.popovych/sdtest-3772-telemetry-exporter branch June 1, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants