Skip to content

fix(ios): send info host events to Sentry Logs - #2295

Merged
filvecchiato merged 1 commit into
mainfrom
hosts/ios-host-event-routes
Nov 25, 2026
Merged

filvecchiato merged 1 commit into
mainfrom
hosts/ios-host-event-routes

Conversation

@filvecchiato

Copy link
Copy Markdown
Collaborator

Sends info-level host events to Sentry Logs, so they are queried as log lines next to the truapi. ones; warning and error events are still captured as issues.

A log line carries the event's tags and extras flattened into attributes, plus tag: host.telemetry and event.name, which an event cannot overwrite. It has no fingerprint or counters, since a log has neither grouping nor contexts.

Split out of #1345.

@filvecchiato
filvecchiato requested review from a team as code owners November 24, 2026 05:44
@github-actions

Copy link
Copy Markdown
Contributor

This pull request touches an app, which is not built by default. Add a label for each build you want:

  • iOS simulator build, ci:ios-simulator: builds the iOS app and attaches a build for the iOS Simulator on a Mac; its unit tests run on every pull request.
  • iOS device build, ci:ios-device: attaches a signed build that installs on a registered iPhone or iPad.

Each starts as soon as it is added and follows the branch from then on.

@github-actions github-actions Bot added size:S Pull requests only. 50 to 199 lines changed status:waiting-on-review Ready for a reviewer labels Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Bundle size report

Compared with main at 97a6675.

Raw Gzip Brotli
truapi-host 8.92 MiB 6.01 MiB 5.63 MiB
truapi-provider 4.17 MiB 1.32 MiB 992.3 KiB
truapi 9.29 MiB 1.31 MiB 1.06 MiB
trinity-stack 645.8 KiB 250.8 KiB 207.5 KiB
Total 23.02 MiB 8.88 MiB 7.86 MiB

WebAssembly modules

Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 3.79 MiB 1.31 MiB 992.2 KiB
truapi-host/wasm/web/truapi_verifiable_bg.wasm 4.89 MiB 4.64 MiB 4.61 MiB
truapi-provider/truapi_provider_bg.wasm 4.12 MiB 1.31 MiB 983.4 KiB
trinity-stack/wasm/trinity_stack_bg.wasm 574.4 KiB 233.3 KiB 192.2 KiB

No file changed size.

Commit: 4b5db56

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

CI Status: 26 required jobs green, 18 passed and 8 skipped by path filter.

All job results
job result
android-app skipped
android-bindings skipped
bundle-size success
changes success
changeset-guard skipped
cli-package skipped
codegen success
e2e skipped
explorer success
headless-install success
host-wasm success
install-action skipped
ios-app success
ios-bindings success
ios-lint success
licenses success
playground success
provider-android-bindings skipped
release-guard success
rust success
ts-client success
ts-debugger success
ts-host success
ts-trinity-stack success
wasm-provider success
workflow-lint skipped

Signing credentials: valid as of 2026-11-24

Commit 4b5db569 · run log

@github-actions github-actions Bot added status:ready-to-merge Approved and waiting only to be queued and removed status:waiting-on-review Ready for a reviewer labels Nov 25, 2026
@brevy-app

brevy-app Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

A suggested description for this PR, from the changes of the patch:

Problem

Info-level host events reach Sentry as captured events with logger host.telemetry, so they show up as issues and cannot be queried in Sentry Logs next to the truapi. log lines. SentryHostEventRecorder.record builds an Event for every level.

Fix

HostEvent.route in HostEventRoute.swift sends info events to SentrySDK.logger.info as a log line and keeps warning and error events on the capture path. The log line uses the event name as its body and flattens tags and extras into attributes. It then sets tag: host.telemetry and event.name last so an event cannot overwrite them, and it drops the fingerprint and counters.

Decisions

  • When a tag and an extra share a key, the extra wins, because Sentry resolves the same key that way.
How the description can help the reviewers more
  • The body does not name a change of hosts/ios/Packages/IssueMonitoring/Sources/HostEventRoute.swift: When a tag and an extra share a key, the log attribute takes the extra's value (attributes.merge(extras) { _, extra in extra }), so the tag value is dropped.

Comment /brevy describe to get the suggestion as Markdown to copy, or /brevy guide for a short review guide. A thumbs up or a thumbs down on this comment tells me if the suggestion helps.

The check and the review guide of this PR are also in Brevy.

@filvecchiato
filvecchiato added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 33cb102 Nov 25, 2026
82 of 84 checks passed
@filvecchiato
filvecchiato deleted the hosts/ios-host-event-routes branch November 25, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S Pull requests only. 50 to 199 lines changed status:ready-to-merge Approved and waiting only to be queued

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants