Skip to content

ref: improve telemetry processor encoding#1298

Merged
giortzisg merged 3 commits into
masterfrom
ref/envelope-convertible
May 6, 2026
Merged

ref: improve telemetry processor encoding#1298
giortzisg merged 3 commits into
masterfrom
ref/envelope-convertible

Conversation

@giortzisg
Copy link
Copy Markdown
Contributor

Description

This PR improves the abstraction of adding and serializing telemetry items for the telemetry processor.

The changes include:

  • refactoring the scheduler around ToEnvelope instead of ToEnvelopeItem. Creating the envelope should be the responsibility of the event itself. This changes was needed for cases like attachments, where events should handle any additional encoding that should happen on the envelope.
  • abstract batchable logic to the ItemContainer. Added the abstraction layer of item container and removed metric_batch and log_batch which were sharing the same underlying logic.
  • modified report.RecordItem to require one less typecast.

#skip-changelog

Issues

Changelog Entry Instructions

To add a custom changelog entry, uncomment the section above. Supports:

  • Single entry: just write text
  • Multiple entries: use bullet points
  • Nested bullets: indent 4+ spaces

For more details: custom changelog entries

Reminders

@giortzisg giortzisg requested a review from lcian May 4, 2026 12:51
@giortzisg giortzisg self-assigned this May 4, 2026
@giortzisg giortzisg force-pushed the ref/envelope-convertible branch from 68ae17a to 1e93b49 Compare May 4, 2026 12:53
Comment thread internal/protocol/item_container.go
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0599974. Configure here.

Comment thread internal/protocol/item_container.go Outdated
@lcian lcian removed their request for review May 4, 2026 19:43
this updates the ItemContainer to properly count and skip unserializable
items. In cases where zero items remain we return an error.
Comment thread internal/telemetry/scheduler.go
@giortzisg giortzisg requested review from Litarnus and sl0thentr0py May 5, 2026 10:00
@giortzisg giortzisg merged commit 96cdfc5 into master May 6, 2026
15 checks passed
@giortzisg giortzisg deleted the ref/envelope-convertible branch May 6, 2026 11:31
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