Skip to content

feat(logs): Add Best Practices section to all SDK logs documentation#15935

Merged
KyleTryon merged 5 commits intomasterfrom
sergiydybskiy/logs-best-practices-v2
Apr 16, 2026
Merged

feat(logs): Add Best Practices section to all SDK logs documentation#15935
KyleTryon merged 5 commits intomasterfrom
sergiydybskiy/logs-best-practices-v2

Conversation

@sergical
Copy link
Copy Markdown
Member

@sergical sergical commented Jan 8, 2026

Summary

  • Creates platform-includes for Best Practices with SDK-specific code examples covering:
    • Wide Events Over Scattered Logs — Emit one comprehensive log per operation
    • Include Business Context — Add user tier, transaction data, feature flags
    • Consistent Attribute Naming — Use snake_case convention
  • Adds Best Practices section to all 20 SDK logs pages using <PlatformContent includePath="logs/best-practices" />
  • Replaces inline Best Practices in Next.js logs page with the platform-include

Platforms covered

JavaScript, Python, Go, Java, PHP, Ruby, .NET, Android, iOS, React Native, Dart/Flutter, Native, Godot, Unity, Unreal, Rust

Test plan

  • Verify build succeeds
  • Check Next.js logs page renders Best Practices correctly
  • Spot check a few other SDK logs pages

🤖 Generated with Claude Code

Creates platform-includes for best practices with SDK-specific code examples:
- Wide Events Over Scattered Logs
- Include Business Context
- Consistent Attribute Naming

Adds Best Practices section to all 20 SDK logs pages using platform-includes
for consistent documentation across JavaScript, Python, Go, Java, PHP, Ruby,
.NET, Android, iOS, React Native, Dart/Flutter, Native, Godot, Unity, Unreal,
and Rust.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Apr 16, 2026 2:39pm
sentry-docs Ready Ready Preview, Comment Apr 16, 2026 2:39pm

Request Review

Comment thread platform-includes/logs/best-practices/apple.mdx Outdated
Copy link
Copy Markdown
Member

@JoshuaMoelans JoshuaMoelans left a comment

Choose a reason for hiding this comment

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

The Native page LGTM 🔥

Copy link
Copy Markdown
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

The React Native part LGTM 🚀
Thank you for this enhancement 🙇

Also looping in @lucas-zimerman who has more context on the logs implementation in case he has more feedback 🙏

Copy link
Copy Markdown
Contributor

@sfanahata sfanahata left a comment

Choose a reason for hiding this comment

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

This is cool. I did a similar thing for our /common/ file in #16195 - would be good to look over and modify to make sure not too much duplicate info is there.

Addresses PR review feedback to reference dot-notation for attribute
namespacing, matching Sentry's own default attributes convention.

Made-with: Cursor
Copy link
Copy Markdown
Contributor

@buenaflor buenaflor left a comment

Choose a reason for hiding this comment

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

Dart/Flutter 👍

The merge from master brought in inline best practices from #16195
alongside the PlatformContent include from this PR. Keep only the
include to stay consistent with all other platform logs pages.

Made-with: Cursor
@KyleTryon KyleTryon merged commit 54b5a0c into master Apr 16, 2026
18 checks passed
@KyleTryon KyleTryon deleted the sergiydybskiy/logs-best-practices-v2 branch April 16, 2026 14:50
szokeasaurusrex added a commit that referenced this pull request Apr 20, 2026
None of the examples in the "Best Practices" section of the Rust SDK docs, added in #15935, compile.

Removing them for now until we can properly fix the section; keeping it around does more harm than good imo.
szokeasaurusrex added a commit that referenced this pull request Apr 20, 2026
None of the examples in the "Best Practices" section of the Rust SDK
docs, added in #15935, compile.

Removing them for now until we can properly fix the section; keeping it
around does more harm than good imo.
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.

10 participants