diff --git a/docs/platforms/android/logs/index.mdx b/docs/platforms/android/logs/index.mdx index 9bf5f04f255f68..f0e5b76bf5bad2 100644 --- a/docs/platforms/android/logs/index.mdx +++ b/docs/platforms/android/logs/index.mdx @@ -28,3 +28,7 @@ With Sentry Structured Logs, you can send text based log information from your a ## Options + +## Default Attributes + + diff --git a/docs/platforms/dart/guides/flutter/logs/index.mdx b/docs/platforms/dart/guides/flutter/logs/index.mdx index cb9856b18584eb..78627c769b40aa 100644 --- a/docs/platforms/dart/guides/flutter/logs/index.mdx +++ b/docs/platforms/dart/guides/flutter/logs/index.mdx @@ -24,3 +24,7 @@ With Sentry Structured Logs, you can send text based log information from your a ## Options + +## Default Attributes + + diff --git a/docs/platforms/go/common/logs/index.mdx b/docs/platforms/go/common/logs/index.mdx index 8909c56716ed22..3a3b1802c5ebd9 100644 --- a/docs/platforms/go/common/logs/index.mdx +++ b/docs/platforms/go/common/logs/index.mdx @@ -157,3 +157,15 @@ if err := sentry.Init(sentry.ClientOptions{ ### Debug If the `Debug` init option is set to true, calls to the `sentry.Logger` will also print to the console with the appropriate log level. + +## Default Attributes + +The Go SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + diff --git a/docs/platforms/java/common/logs/index.mdx b/docs/platforms/java/common/logs/index.mdx index 9bf5f04f255f68..f0e5b76bf5bad2 100644 --- a/docs/platforms/java/common/logs/index.mdx +++ b/docs/platforms/java/common/logs/index.mdx @@ -28,3 +28,7 @@ With Sentry Structured Logs, you can send text based log information from your a ## Options + +## Default Attributes + + diff --git a/docs/platforms/javascript/common/logs/index.mdx b/docs/platforms/javascript/common/logs/index.mdx index 99f7146c06e976..9c1d10f1c9657b 100644 --- a/docs/platforms/javascript/common/logs/index.mdx +++ b/docs/platforms/javascript/common/logs/index.mdx @@ -34,3 +34,7 @@ With Sentry Structured Logs, you can send text based log information from your a ## Options + +## Default Attributes + + diff --git a/docs/platforms/php/common/logs/index.mdx b/docs/platforms/php/common/logs/index.mdx index 3f562ae69f0211..26bafb84dd5214 100644 --- a/docs/platforms/php/common/logs/index.mdx +++ b/docs/platforms/php/common/logs/index.mdx @@ -30,3 +30,7 @@ Let us know what you would like to see on GitHub: [Symfony Logs](https://github. ## Options + +## Default Attributes + + diff --git a/docs/platforms/python/logs/index.mdx b/docs/platforms/python/logs/index.mdx index 9bf5f04f255f68..f0e5b76bf5bad2 100644 --- a/docs/platforms/python/logs/index.mdx +++ b/docs/platforms/python/logs/index.mdx @@ -28,3 +28,7 @@ With Sentry Structured Logs, you can send text based log information from your a ## Options + +## Default Attributes + + diff --git a/docs/platforms/react-native/logs/index.mdx b/docs/platforms/react-native/logs/index.mdx index c29b2e4e3308bf..c22d42ef3d836e 100644 --- a/docs/platforms/react-native/logs/index.mdx +++ b/docs/platforms/react-native/logs/index.mdx @@ -30,3 +30,7 @@ With Sentry Structured Logs, you can send text based log information from your a ## Options + +## Default Attributes + + diff --git a/docs/platforms/ruby/logs/index.mdx b/docs/platforms/ruby/logs/index.mdx index 381bd236fa2134..78627c769b40aa 100644 --- a/docs/platforms/ruby/logs/index.mdx +++ b/docs/platforms/ruby/logs/index.mdx @@ -20,3 +20,11 @@ With Sentry Structured Logs, you can send text based log information from your a ## Usage + +## Options + + + +## Default Attributes + + diff --git a/docs/platforms/rust/common/logs/index.mdx b/docs/platforms/rust/common/logs/index.mdx index fad61b17ecd3a5..91bbebf0e352c6 100644 --- a/docs/platforms/rust/common/logs/index.mdx +++ b/docs/platforms/rust/common/logs/index.mdx @@ -224,3 +224,15 @@ let _guard = sentry::init(("___PUBLIC_DSN___", sentry::ClientOptions { ..Default::default() })); ``` + +## Default Attributes + +The Rust SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + diff --git a/platform-includes/logs/default-attributes/android.mdx b/platform-includes/logs/default-attributes/android.mdx new file mode 100644 index 00000000000000..e16aa75dc391b5 --- /dev/null +++ b/platform-includes/logs/default-attributes/android.mdx @@ -0,0 +1,9 @@ +The Android SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/browser.mdx b/platform-includes/logs/default-attributes/browser.mdx new file mode 100644 index 00000000000000..435498809f3ffe --- /dev/null +++ b/platform-includes/logs/default-attributes/browser.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/core.mdx b/platform-includes/logs/default-attributes/core.mdx new file mode 100644 index 00000000000000..c429f9102a7cde --- /dev/null +++ b/platform-includes/logs/default-attributes/core.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/dart.mdx b/platform-includes/logs/default-attributes/dart.mdx new file mode 100644 index 00000000000000..0dfd05b22c5e36 --- /dev/null +++ b/platform-includes/logs/default-attributes/dart.mdx @@ -0,0 +1,9 @@ +The Dart SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/java.mdx b/platform-includes/logs/default-attributes/java.mdx new file mode 100644 index 00000000000000..ef19b684f8d414 --- /dev/null +++ b/platform-includes/logs/default-attributes/java.mdx @@ -0,0 +1,9 @@ +The Java SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/javascript.mdx b/platform-includes/logs/default-attributes/javascript.mdx new file mode 100644 index 00000000000000..60597ac08d7d08 --- /dev/null +++ b/platform-includes/logs/default-attributes/javascript.mdx @@ -0,0 +1,11 @@ +The JavaScript SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + + + \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/message-template/android.mdx b/platform-includes/logs/default-attributes/message-template/android.mdx new file mode 100644 index 00000000000000..5067178c84576d --- /dev/null +++ b/platform-includes/logs/default-attributes/message-template/android.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/message-template/dart.mdx b/platform-includes/logs/default-attributes/message-template/dart.mdx new file mode 100644 index 00000000000000..5067178c84576d --- /dev/null +++ b/platform-includes/logs/default-attributes/message-template/dart.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/message-template/go.mdx b/platform-includes/logs/default-attributes/message-template/go.mdx new file mode 100644 index 00000000000000..a6e1c255d5ece2 --- /dev/null +++ b/platform-includes/logs/default-attributes/message-template/go.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/message-template/java.mdx b/platform-includes/logs/default-attributes/message-template/java.mdx new file mode 100644 index 00000000000000..f2ee86c383ddf0 --- /dev/null +++ b/platform-includes/logs/default-attributes/message-template/java.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/message-template/javascript.mdx b/platform-includes/logs/default-attributes/message-template/javascript.mdx new file mode 100644 index 00000000000000..26d22aa54c3877 --- /dev/null +++ b/platform-includes/logs/default-attributes/message-template/javascript.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/message-template/php.mdx b/platform-includes/logs/default-attributes/message-template/php.mdx new file mode 100644 index 00000000000000..f2ee86c383ddf0 --- /dev/null +++ b/platform-includes/logs/default-attributes/message-template/php.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/message-template/python.mdx b/platform-includes/logs/default-attributes/message-template/python.mdx new file mode 100644 index 00000000000000..6ff4d6232759b0 --- /dev/null +++ b/platform-includes/logs/default-attributes/message-template/python.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/message-template/ruby.mdx b/platform-includes/logs/default-attributes/message-template/ruby.mdx new file mode 100644 index 00000000000000..f2ee86c383ddf0 --- /dev/null +++ b/platform-includes/logs/default-attributes/message-template/ruby.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/message-template/rust.mdx b/platform-includes/logs/default-attributes/message-template/rust.mdx new file mode 100644 index 00000000000000..5067178c84576d --- /dev/null +++ b/platform-includes/logs/default-attributes/message-template/rust.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/mobile.mdx b/platform-includes/logs/default-attributes/mobile.mdx new file mode 100644 index 00000000000000..6947ca9b861139 --- /dev/null +++ b/platform-includes/logs/default-attributes/mobile.mdx @@ -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 \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/php.mdx b/platform-includes/logs/default-attributes/php.mdx new file mode 100644 index 00000000000000..a3543a9ef6ade9 --- /dev/null +++ b/platform-includes/logs/default-attributes/php.mdx @@ -0,0 +1,9 @@ +The PHP SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/python.mdx b/platform-includes/logs/default-attributes/python.mdx new file mode 100644 index 00000000000000..68112e3eda272e --- /dev/null +++ b/platform-includes/logs/default-attributes/python.mdx @@ -0,0 +1,9 @@ +The Python SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/react-native.mdx b/platform-includes/logs/default-attributes/react-native.mdx new file mode 100644 index 00000000000000..912ffc1fad05bd --- /dev/null +++ b/platform-includes/logs/default-attributes/react-native.mdx @@ -0,0 +1,9 @@ +The React Native SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/ruby.mdx b/platform-includes/logs/default-attributes/ruby.mdx new file mode 100644 index 00000000000000..8c4b9361787368 --- /dev/null +++ b/platform-includes/logs/default-attributes/ruby.mdx @@ -0,0 +1,9 @@ +The Ruby SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/rust.mdx b/platform-includes/logs/default-attributes/rust.mdx new file mode 100644 index 00000000000000..2b3e90c4f4770f --- /dev/null +++ b/platform-includes/logs/default-attributes/rust.mdx @@ -0,0 +1,9 @@ +The Rust SDK automatically sets several default attributes on all log entries to provide context and improve debugging: + + + + + + + + \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/server.mdx b/platform-includes/logs/default-attributes/server.mdx new file mode 100644 index 00000000000000..7bec89d1b47267 --- /dev/null +++ b/platform-includes/logs/default-attributes/server.mdx @@ -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) \ No newline at end of file diff --git a/platform-includes/logs/default-attributes/user.mdx b/platform-includes/logs/default-attributes/user.mdx new file mode 100644 index 00000000000000..6964140bc71c93 --- /dev/null +++ b/platform-includes/logs/default-attributes/user.mdx @@ -0,0 +1,7 @@ +### User Attributes + +If user information is available in the current scope: + +- `user.id`: The user ID +- `user.name`: The username +- `user.email`: The email address \ No newline at end of file