Skip to content

ref(debug): Improve debug printing for envelope items and cogs#6027

Merged
Dav1dde merged 3 commits into
masterfrom
dav1d/better-debug-impls
May 29, 2026
Merged

ref(debug): Improve debug printing for envelope items and cogs#6027
Dav1dde merged 3 commits into
masterfrom
dav1d/better-debug-impls

Conversation

@Dav1dde
Copy link
Copy Markdown
Member

@Dav1dde Dav1dde commented May 28, 2026

Before:

TRACE relay_server::processing::relay: processing item: SerializedAttachments { headers: EnvelopeHeaders { event_id: Some(EventId(51553901-8c9b-4260-a6f9-99572f1661ee)), meta: RequestMeta { dsn: http://47d312dddd454ad7bf611cea74884371:@127.0.0.1:60024/42, client: Some("raven-node/2.6.3"), version: 5, origin: None, remote_addr: Some(127.0.0.1), forwarded_for: "127.0.0.1", user_agent: Some("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"), client_hints: ClientHints { sec_ch_ua_platform: None, sec_ch_ua_platform_version: None, sec_ch_ua: None, sec_ch_ua_model: None }, no_cache: false, received_at: 2026-05-28T11:23:25.872050Z, signature: None, request_trust: Some(Untrusted) }, retention: None, downsampled_retention: None, sent_at: None, trace: None, required_features: [], other: {} }, attachments: [Item { headers: ItemHeaders { ty: Attachment, stored_key: None, routing_hint: None, rate_limited: false, source_quantities: None, inner: {Known(Length): ItemHeaderValue(Number(12)), Known(AttachmentType): ItemHeaderValue(String("event.attachment")), Known(Filename): ItemHeaderValue(String("foo.txt"))} }, payload: b"file content" }] } processor="relay_server::processing::attachments::AttachmentProcessor"

TRACE relay_server::services::cogs: recording measurement: CogsMeasurement { resource: Relay, feature: StandaloneAttachments, category: None, value: Time(97.417µs) }

TRACE relay_server::processing::relay: processing item: InvalidUnhandledItems { invalid_items: [Item { headers: ItemHeaders { ty: FormData, stored_key: None, routing_hint: None, rate_limited: false, source_quantities: None, inner: {Known(Length): ItemHeaderValue(Number(26)), Known(ContentType): ItemHeaderValue(String("text/plain"))} }, payload: b"\x08\0\0\0form_key\n\0\0\0form value" }] } processor="relay_server::processing::invalid::InvalidUnhandledProcessor"

After:

TRACE relay_server::processing::relay: processing item: SerializedAttachments { headers: {"event_id": 51553901-8c9b-4260-a6f9-99572f1661ee, "meta": {"dsn": http://6a877703d1b343b6a2d27ba97bd6fd88:@127.0.0.1:60949/42, "client": "raven-node/2.6.3", "version": 5, "remote_addr": 127.0.0.1, "forwarded_for": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36", "received_at": 2026-05-28T11:48:33.598095Z, "request_trust": Untrusted}}, attachments: [Item { headers: {"type": Attachment, Length: "12", AttachmentType: "event.attachment", Filename: "foo.txt"}, payload: b"file content" }] } processor="relay_server::processing::attachments::AttachmentProcessor"

TRACE relay_server::services::cogs: recording measurement: Relay@standalone_attachments=156.792µs

TRACE relay_server::processing::relay: processing item: InvalidUnhandledItems { invalid_items: [Item { headers: {"type": FormData, Length: "26", ContentType: "text/plain"}, payload: b"\x08\0\0\0form_key\n\0\0\0form value" }] } processor="relay_server::processing::invalid::InvalidUnhandledProcessor"

Makes log output in tests/local sessions a bit more digestible.

@Dav1dde Dav1dde requested a review from a team as a code owner May 28, 2026 11:51
@Dav1dde Dav1dde self-assigned this May 28, 2026
@Dav1dde Dav1dde force-pushed the dav1d/better-debug-impls branch from e4132e0 to 8f0790e Compare May 28, 2026 11:52
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 8f0790e. Configure here.

Comment thread relay-server/src/envelope/item.rs Outdated
Comment thread relay-server/src/envelope/item.rs
@Dav1dde Dav1dde added this pull request to the merge queue May 29, 2026
Merged via the queue into master with commit 959381e May 29, 2026
33 checks passed
@Dav1dde Dav1dde deleted the dav1d/better-debug-impls branch May 29, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants