-
-
Notifications
You must be signed in to change notification settings - Fork 214
feat: support for Structured Logs #969
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
solnic
merged 20 commits into
master
from
906-sentry-logger-handler-for-structured-logging
Jan 23, 2026
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
6ecc086
Introduce Logs handler for structured logging
solnic 5cd67ea
fix: timer race condition in LogEventBuffer flush
solnic 973bb37
fix: use Task.Supervisor for async log event sending
solnic 0232c0d
perf: track event count in state to avoid repeated length/1 calls
solnic 8880d32
refactor: rename send_log_events/1 to send_log_batch/1
solnic 1bfc6ba
fix: remove LogEvent.t() from get_data_category/1 type spec
solnic 119d1c1
docs: fix version typo (11.0.0 -> 12.0.0)
solnic 237ab44
docs: add version annotations to logs config options
solnic 92f63b6
docs: format content type with backticks
solnic 0b7962a
docs: link URLs properly
solnic e50dc37
refactor: make buffer configurable
solnic 22f2436
Update CHANGELOG.md
solnic cb2fd6d
Update lib/sentry/log_event.ex
solnic 8d04f9b
Update lib/sentry/log_event.ex
solnic 021cabf
fix: remove LogEvent from envelope items
solnic 515fa87
fix: enabled_logs -> enable_logs
solnic afbd8d1
fix: formatting
solnic 33ffad1
refactor: introduce a unified logger handler
solnic d9b04fc
fixup: update log event structure to match relay requirements
solnic 35dfb1b
fixup: flush stale also in handle_cast
solnic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| defmodule Sentry.LogBatch do | ||
| @moduledoc """ | ||
| A batch of log events to be sent in a single envelope item. | ||
|
|
||
| According to the Sentry Logs Protocol, log events are sent in batches | ||
| within a single envelope item with content type `application/vnd.sentry.items.log+json`. | ||
| """ | ||
| @moduledoc since: "12.0.0" | ||
|
|
||
| alias Sentry.LogEvent | ||
|
|
||
| @type t() :: %__MODULE__{ | ||
| log_events: [LogEvent.t()] | ||
| } | ||
|
|
||
| @enforce_keys [:log_events] | ||
| defstruct [:log_events] | ||
| end |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.