Skip to content

feat(internal): stdout transport - #2213

Open
jpnurmi wants to merge 1 commit into
v1from
jpnurmi/feat/stdout-transport
Open

jpnurmi wants to merge 1 commit into
v1from
jpnurmi/feat/stdout-transport

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

The inproc-based Android NDK uses SENTRY_TRANSPORT=none and installs a JNI function transport that writes to outbox/, leaving HTTP delivery to Java. Tests substitute it with a stdout callback to inspect envelopes without Java or HTTP.

However, the Native daemon in #1725 cannot use the function transport from the separate daemon process. Provide (an internal) built-in stdout transport (SENTRY_TRANSPORT=stdout) that both the SDK and daemon can instantiate. This allows us to run test_integration_stdout.py for Native/Android in #1725.

The undocumented stdout transport is mostly intended for our own integration testing purposes, but it's also handy for quick experiments:

$ make build SENTRY_BACKEND=inproc SENTRY_TRANSPORT=stdout
...
$ ./build/sentry_example_crash 2>/dev/null
{"event_id":"0e1d5355-5ba8-42cb-9e96-c6610d4ee9c1",...}
{"type":"event","length":2823}
{"event_id":"0e1d5355-5ba8-42cb-9e96-c6610d4ee9c1","timestamp":"2026-10-16T16:19:26.968633Z","platform":"native","level":"fatal","exception":...}
...

#skip-changelog (internal)

The inproc-based Android NDK uses `SENTRY_TRANSPORT=none` and installs
a JNI function transport that writes to `outbox/`, leaving HTTP delivery
to Java. Tests substitute it with an stdout callback to inspect envelopes
without Java or HTTP.

However, the Native daemon in #1725 cannot use the function transport
from the separate daemon process. Provide (an internal) built-in stdout
transport (`SENTRY_TRANSPORT=stdout`) that both the SDK and daemon can
instantiate. This is mostly for out own integration testing purposes,
but it's also super handy for quick experiments:

```sh
$ make build SENTRY_BACKEND=inproc SENTRY_TRANSPORT=stdout
...
$ ./build/sentry_example_crash
...
[sentry] DEBUG sending envelope
{"event_id":"0e1d5355-5ba8-42cb-9e96-c6610d4ee9c1",...}
{"type":"event","length":2823}
{"event_id":"0e1d5355-5ba8-42cb-9e96-c6610d4ee9c1","timestamp":"2026-10-16T16:19:26.968633Z","platform":"native","level":"fatal","exception":...}
[sentry] INFO entering signal handler
...
```
@jpnurmi jpnurmi added the v1 Targets 1.0 (v1 branch) label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against c5068b8

@jpnurmi
jpnurmi added this pull request to stack #2214 October 16, 2026 16:37
@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.16%. Comparing base (4ce28e7) to head (c5068b8).

Additional details and impacted files
@@            Coverage Diff             @@
##               v1    #2213      +/-   ##
==========================================
+ Coverage   75.13%   75.16%   +0.02%     
==========================================
  Files         104      105       +1     
  Lines       29630    29648      +18     
  Branches     5479     5480       +1     
==========================================
+ Hits        22263    22284      +21     
+ Misses       5960     5957       -3     
  Partials     1407     1407              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1 Targets 1.0 (v1 branch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant