-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Document default sdk logging attributes #14353
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
base: master
Are you sure you want to change the base?
Changes from all commits
7136f13
47048e5
c6d9a91
1419f69
eb5d492
2f99929
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The Android SDK automatically sets several default attributes on all log entries to provide context and improve debugging: | ||
|
||
<Include name="logs/default-attributes/core.mdx" /> | ||
|
||
<Include name="logs/default-attributes/message-template/android.mdx" /> | ||
|
||
<Include name="logs/default-attributes/user.mdx" /> | ||
|
||
<Include name="logs/default-attributes/mobile.mdx" /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Browser Attributes | ||
|
||
For browser-based applications: | ||
|
||
- `browser.name`: Display name of the browser application | ||
- `browser.version`: Version string of the browser |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### Core Attributes | ||
|
||
- `sentry.environment`: The environment set in the SDK if defined | ||
- `sentry.release`: The release set in the SDK if defined | ||
- `sentry.trace.parent_span_id`: The span ID of the span that was active when the log was collected (only set if there was an active span) | ||
- `sentry.sdk.name`: The name of the SDK that sent the log | ||
- `sentry.sdk.version`: The version of the SDK that sent the log |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The Dart SDK automatically sets several default attributes on all log entries to provide context and improve debugging: | ||
|
||
<Include name="logs/default-attributes/core.mdx" /> | ||
|
||
<Include name="logs/default-attributes/message-template/dart.mdx" /> | ||
|
||
<Include name="logs/default-attributes/user.mdx" /> | ||
|
||
<Include name="logs/default-attributes/mobile.mdx" /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The Java SDK automatically sets several default attributes on all log entries to provide context and improve debugging: | ||
|
||
<Include name="logs/default-attributes/core.mdx" /> | ||
|
||
<Include name="logs/default-attributes/message-template/java.mdx" /> | ||
|
||
<Include name="logs/default-attributes/user.mdx" /> | ||
|
||
<Include name="logs/default-attributes/server.mdx" /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
The JavaScript SDK automatically sets several default attributes on all log entries to provide context and improve debugging: | ||
|
||
<Include name="logs/default-attributes/core.mdx" /> | ||
|
||
<Include name="logs/default-attributes/message-template/javascript.mdx" /> | ||
|
||
<Include name="logs/default-attributes/user.mdx" /> | ||
|
||
<Include name="logs/default-attributes/browser.mdx" /> | ||
|
||
<Include name="logs/default-attributes/server.mdx" /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Message Template Attributes | ||
|
||
If the log was parameterized using format specifiers, the SDK will also set: | ||
|
||
- `sentry.message.template`: The parameterized template string | ||
- `sentry.message.parameter.X`: The parameters to the template string, where X is the parameter's position |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Message Template Attributes | ||
|
||
If the log was parameterized using format specifiers, the SDK will also set: | ||
|
||
- `sentry.message.template`: The parameterized template string | ||
- `sentry.message.parameter.X`: The parameters to the template string, where X is the parameter's position |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Message Template Attributes | ||
|
||
If the log was parameterized using format specifiers (like `%v`), the SDK will also set: | ||
|
||
- `sentry.message.template`: The parameterized template string | ||
- `sentry.message.parameter.X`: The parameters to the template string, where X is the parameter's position |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Message Template Attributes | ||
|
||
If the log was parameterized using format specifiers (like `%s`), the SDK will also set: | ||
|
||
- `sentry.message.template`: The parameterized template string | ||
- `sentry.message.parameter.X`: The parameters to the template string, where X is the parameter's position |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Message Template Attributes | ||
|
||
If the log was parameterized using `logger.fmt` or format strings, the SDK will also set: | ||
|
||
- `sentry.message.template`: The parameterized template string | ||
- `sentry.message.parameter.X`: The parameters to the template string, where X is the parameter's position |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Message Template Attributes | ||
|
||
If the log was parameterized using format specifiers (like `%s`), the SDK will also set: | ||
|
||
- `sentry.message.template`: The parameterized template string | ||
- `sentry.message.parameter.X`: The parameters to the template string, where X is the parameter's position |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Message Template Attributes | ||
|
||
If the log was parameterized using `{attribute_name}` placeholder syntax, the SDK will also set: | ||
|
||
- `sentry.message.template`: The parameterized template string | ||
- `sentry.message.parameter.X`: The parameters to the template string, where X is the parameter's position or name |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Message Template Attributes | ||
|
||
If the log was parameterized using format specifiers (like `%s`), the SDK will also set: | ||
|
||
- `sentry.message.template`: The parameterized template string | ||
- `sentry.message.parameter.X`: The parameters to the template string, where X is the parameter's position |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Message Template Attributes | ||
|
||
If the log was parameterized using format specifiers, the SDK will also set: | ||
|
||
- `sentry.message.template`: The parameterized template string | ||
- `sentry.message.parameter.X`: The parameters to the template string, where X is the parameter's position |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
### Mobile and Native Device Attributes | ||
|
||
For mobile applications: | ||
|
||
- `os.name`: The name of the operating system | ||
- `os.version`: The version of the operating system | ||
- `device.brand`: The brand of the device | ||
- `device.model`: The model of the device | ||
- `device.family`: The family of the device | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The PHP SDK automatically sets several default attributes on all log entries to provide context and improve debugging: | ||
|
||
<Include name="logs/default-attributes/core.mdx" /> | ||
|
||
<Include name="logs/default-attributes/message-template/php.mdx" /> | ||
|
||
<Include name="logs/default-attributes/user.mdx" /> | ||
|
||
<Include name="logs/default-attributes/server.mdx" /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The Python SDK automatically sets several default attributes on all log entries to provide context and improve debugging: | ||
|
||
<Include name="logs/default-attributes/core.mdx" /> | ||
|
||
<Include name="logs/default-attributes/message-template/python.mdx" /> | ||
|
||
<Include name="logs/default-attributes/user.mdx" /> | ||
|
||
<Include name="logs/default-attributes/server.mdx" /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The React Native SDK automatically sets several default attributes on all log entries to provide context and improve debugging: | ||
|
||
<Include name="logs/default-attributes/core.mdx" /> | ||
|
||
<Include name="logs/default-attributes/message-template/javascript.mdx" /> | ||
|
||
<Include name="logs/default-attributes/user.mdx" /> | ||
|
||
<Include name="logs/default-attributes/mobile.mdx" /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The Ruby SDK automatically sets several default attributes on all log entries to provide context and improve debugging: | ||
|
||
<Include name="logs/default-attributes/core.mdx" /> | ||
|
||
<Include name="logs/default-attributes/message-template/ruby.mdx" /> | ||
|
||
<Include name="logs/default-attributes/user.mdx" /> | ||
|
||
<Include name="logs/default-attributes/server.mdx" /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The Rust SDK automatically sets several default attributes on all log entries to provide context and improve debugging: | ||
|
||
<Include name="logs/default-attributes/core.mdx" /> | ||
|
||
<Include name="logs/default-attributes/message-template/rust.mdx" /> | ||
|
||
<Include name="logs/default-attributes/user.mdx" /> | ||
|
||
<Include name="logs/default-attributes/server.mdx" /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Server Attributes | ||
|
||
For backend applications: | ||
|
||
- `server.address`: The address of the server that sent the log (equivalent to server_name attached to errors and transactions) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### User Attributes | ||
|
||
If user information is available in the current scope: | ||
|
||
- `user.id`: The user ID | ||
Comment on lines
+3
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On mobile, SDKs always provide a default user ID if none is set on the scope, which is required for release health. The SDKs use the installationId as a fallback, which they generate randomly once during the app installation:
So users don't need to set the user.id manually on the scope. When reading this, they might believe they have to set the |
||
- `user.name`: The username | ||
- `user.email`: The email address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list on mobile will grow for sure. I would at least add simulator for now cause that's important and all mobile SDKs should send this.