Skip to content

Introduce Sentry.capture_log #2606

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 14 commits into from
May 2, 2025
Merged

Introduce Sentry.capture_log #2606

merged 14 commits into from
May 2, 2025

Conversation

solnic
Copy link
Collaborator

@solnic solnic commented Apr 25, 2025

First step towards Structured Logging #2600

This adds Sentry.capture_log interface with a new underlying LogEvent event type.

Closes #2603

@solnic solnic linked an issue Apr 25, 2025 that may be closed by this pull request
@solnic solnic mentioned this pull request Apr 25, 2025
4 tasks
@solnic solnic force-pushed the 2603-introduce-logevent branch 3 times, most recently from 43abb90 to 6ae5bef Compare April 29, 2025 13:45
@solnic solnic force-pushed the 2603-introduce-logevent branch from ca4d04c to be910c4 Compare April 30, 2025 12:13
@solnic solnic marked this pull request as ready for review April 30, 2025 13:23
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.

Looks solid! Just one comment about the client method, and then we are good to ✅

Before we move on to the logger interface though (#2604), can we spec out a buffering implementation for logs? We can do it after this PR and create another issue to track it so that we contain the scope of this particular set of changes.

https://develop.sentry.dev/sdk/telemetry/logs/#implementation

It would be nice to get a lightweight logs buffer so that we don't overwhelm sentry with requests, logs were designed so you can send multiple log payloads in a single log envelope.

@solnic solnic mentioned this pull request Apr 30, 2025
@solnic
Copy link
Collaborator Author

solnic commented Apr 30, 2025

Before we move on to the logger interface though (#2604), can we spec out a buffering implementation for logs?

@AbhiPrasad yes this makes sense, I reported #2613 :)

@solnic solnic requested a review from AbhiPrasad May 1, 2025 12:19
@solnic
Copy link
Collaborator Author

solnic commented May 1, 2025

@AbhiPrasad I added remaining pieces of info to the attributes, please take another look 😄

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.

One change with server_name, but approving to unblock! Thanks for the quick pace on this.

@solnic solnic merged commit 6da79bd into master May 2, 2025
137 checks passed
@solnic solnic deleted the 2603-introduce-logevent branch May 2, 2025 09:07
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.

Introduce LogEvent
2 participants