Skip to content

feat(rust): add docs for logs #13945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 10, 2025
Merged

feat(rust): add docs for logs #13945

merged 4 commits into from
Jun 10, 2025

Conversation

lcian
Copy link
Member

@lcian lcian commented Jun 6, 2025

DESCRIBE YOUR PR

Adds docs for new logs feature for Rust.
Also adds Rust to the list of available SDKs.
To be merged after 0.39 is released.
404s are unrelated
Closes getsentry/sentry-rust#826

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline: Jun 16
  • None: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Copy link

vercel bot commented Jun 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
changelog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2025 0:54am
develop-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2025 0:54am
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2025 0:54am

@codeowner-assignment codeowner-assignment bot requested a review from a team June 6, 2025 09:27
Copy link

codecov bot commented Jun 6, 2025

Bundle Report

Changes will increase total bundle size by 153 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.86MB 159 bytes (0.0%) ⬆️
sentry-docs-client-array-push 9.77MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 873.24kB -0.0%
static/chunks/7750-*.js -3 bytes 401.83kB -0.0%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
server/middleware-*.js -5.55kB 1.0kB -84.74%
static/Dyhu1qL2A9lHbZaYbPE4Y/_buildManifest.js (New) 616 bytes 616 bytes 100.0% 🚀
static/Dyhu1qL2A9lHbZaYbPE4Y/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/0CXDODBn6JFg5UJIV1w3S/_buildManifest.js (Deleted) -616 bytes 0 bytes -100.0% 🗑️
static/0CXDODBn6JFg5UJIV1w3S/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.63MB -0.0%
../instrumentation.js -3 bytes 957.45kB -0.0%
9523.js -3 bytes 933.5kB -0.0%
../app/[[...path]]/page.js.nft.json 56 bytes 399.6kB 0.01%
../app/platform-redirect/page.js.nft.json 56 bytes 399.51kB 0.01%
../app/sitemap.xml/route.js.nft.json 56 bytes 397.49kB 0.01%


Once the feature is enabled on the SDK and the SDK is initialized, you can send logs by using the logging macros.
The `sentry` crate exposes macros that support six different log levels:
`logger_trace`, `logger_debug`, `logger_info`, `logger_warn`, `logger_error` and `logger_fatal`.
Copy link
Member Author

Choose a reason for hiding this comment

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

Due to a technical limitation in macros visibility in Rust, these need to be exported at top-level.
We named them with a logger_ prefix to sort of follow the spec and prevent confusion with e.g. capture_error.

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Thanks @lcian!!

@lcian lcian merged commit 6e918af into master Jun 10, 2025
12 of 13 checks passed
@lcian lcian deleted the lcian/feat/rust-logs branch June 10, 2025 12:57
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.

[Structured logging] Docs
2 participants