diff --git a/src/docs/sdk/overview.mdx b/src/docs/sdk/overview.mdx index c1995fbc0e..247fc92d48 100644 --- a/src/docs/sdk/overview.mdx +++ b/src/docs/sdk/overview.mdx @@ -215,6 +215,7 @@ We recommend always sending the following headers: - `content-type` - `content-length` +- `user-agent` The following additional headers are permitted as per CORS policy: @@ -229,6 +230,30 @@ The following additional headers are permitted as per CORS policy: - `content-encoding` - `transfer-encoding` +### User Agent + +All SDKs are expected to report their name and version via the `user-agent` header. +The following format should be used (unless required or recommended differently by the platform, +e.g. for browser SDKs, where the user agent header must be set by the browser itself): + +`{sdk-name}/{sdk-version}` + +For example: +- `sentry.python/1.45.0` +- `sentry.php/4.7.0` +- `sentry-ruby/5.17.3` +- `sentry.cocoa/8.24.0` + +Additional information about the runtime, operating system, and others can be +appended as comments in parentheses, separated by `; ` (semicolon and space), like so: + +`{sdk-name}/{sdk-version} ({runtime-name} {runtime-version}; {os-name} {os-version})` + +There is no expectation towards the presence or order of fields. The user agent +must not contain PII or otherwise sensitive data. In general it should not contain +any information that is not already present in the payload. + + ## Request Compression SDKs are heavily encouraged to compress the request body before sending it to