From 84108d5486a8d4a72d191f8c0751eef51d699a65 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Wed, 8 Oct 2025 11:31:03 +0200 Subject: [PATCH 1/6] feat(develop): Document options for adding code source information --- develop-docs/sdk/telemetry/traces/index.mdx | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/develop-docs/sdk/telemetry/traces/index.mdx b/develop-docs/sdk/telemetry/traces/index.mdx index c69f5111c4319..9177ca8e9aed4 100644 --- a/develop-docs/sdk/telemetry/traces/index.mdx +++ b/develop-docs/sdk/telemetry/traces/index.mdx @@ -156,6 +156,49 @@ Examples: `[403, 404]`: don't sample transactions corresponding to requests with status code 403 or 404 `[[300, 399], [401, 404]]`: don't sample transactions corresponding to requests with status codes between 300 and 399 (inclusive) or between 401 and 404 (inclusive) +### `enableDbQuerySource` + +This MUST be a boolean value that defaults to `true`. + +The option controls if attributes with code source information are set on database query spans when the query duration exceeds a given threshold. + +The following attributes, or a subset thereof, SHOULD be set on database query spans if the threshold is exceeded. +Values for some of the attributes below may be unobtainable in specific situations for the SDK, and in these cases a subset MAY be provided. + +The attributes are described in Sentry's Span Convention Documentation. + +- code.filepath +- code.lineno +- code.function +- code.namespace + +### dbQuerySourceThresholdMs + +A threshold duration, which SHOULD be a floating point or integer value. +The value specifies, in milliseconds, the duration of a database query before code source information is added. + +### enableHttpRequestSource + +This MUST be a boolean value that defaults to `true`. + +The option controls if attributes with code source information are set on outgoing HTTP requests. +When enabled, the attributes SHOULD be attached only when the time to receive the response from sending the request exceeds a given threshold. + +The following attributes, or a subset thereof, SHOULD be set if the threshold is exceeded. +Values for some of the attributes below may be unobtainable in specific situations for the SDK, and in these cases a subset MAY be provided. + +The attributes are described in Sentry's Span Convention Documentation. + +- code.filepath +- code.lineno +- code.function +- code.namespace + +### httpRequestSourceThresholdMs + +A threshold duration, which SHOULD be a floating point or integer value. +The value specifies, in milliseconds, the time between sending an HTTP request and receiving its response, after which code source information is added. + ## `Event` Changes As of writing, transactions are implemented as an extension of the `Event` From cb8dea28865949db5fa9360db1c14cd5a4caf3d2 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Wed, 8 Oct 2025 11:39:51 +0200 Subject: [PATCH 2/6] elaborate default value --- develop-docs/sdk/telemetry/traces/index.mdx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/develop-docs/sdk/telemetry/traces/index.mdx b/develop-docs/sdk/telemetry/traces/index.mdx index 9177ca8e9aed4..f3ba154262bfd 100644 --- a/develop-docs/sdk/telemetry/traces/index.mdx +++ b/develop-docs/sdk/telemetry/traces/index.mdx @@ -174,9 +174,11 @@ The attributes are described in Date: Wed, 8 Oct 2025 11:41:24 +0200 Subject: [PATCH 3/6] add backticks --- develop-docs/sdk/telemetry/traces/index.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/develop-docs/sdk/telemetry/traces/index.mdx b/develop-docs/sdk/telemetry/traces/index.mdx index f3ba154262bfd..cb0c3102a4daf 100644 --- a/develop-docs/sdk/telemetry/traces/index.mdx +++ b/develop-docs/sdk/telemetry/traces/index.mdx @@ -172,14 +172,14 @@ The attributes are described in Date: Wed, 8 Oct 2025 12:54:02 +0200 Subject: [PATCH 4/6] simplify language --- develop-docs/sdk/telemetry/traces/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/develop-docs/sdk/telemetry/traces/index.mdx b/develop-docs/sdk/telemetry/traces/index.mdx index cb0c3102a4daf..d1eddf34a9e54 100644 --- a/develop-docs/sdk/telemetry/traces/index.mdx +++ b/develop-docs/sdk/telemetry/traces/index.mdx @@ -163,7 +163,7 @@ This MUST be a boolean value that defaults to `true`. The option controls if attributes with code source information are set on database query spans when the query duration exceeds a given threshold. The following attributes, or a subset thereof, SHOULD be set on database query spans if the threshold is exceeded. -Values for some of the attributes below may be unobtainable in specific situations for the SDK, and in these cases a subset MAY be provided. +Values for some of the attributes below may be unavailable in some situations for the SDK, and in these cases a subset MAY be provided. The attributes are described in Sentry's Span Convention Documentation. @@ -187,7 +187,7 @@ The option controls if attributes with code source information are set on outgoi When enabled, the attributes SHOULD be attached only when the time to receive the response from sending the request exceeds a given threshold. The following attributes, or a subset thereof, SHOULD be set if the threshold is exceeded. -Values for some of the attributes below may be unobtainable in specific situations for the SDK, and in these cases a subset MAY be provided. +Values for some of the attributes below may be unavailable in some situations for the SDK, and in these cases a subset MAY be provided. The attributes are described in Sentry's Span Convention Documentation. From c662e030a03753e53596c78dcf1aaef8212e9f69 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Wed, 8 Oct 2025 13:34:31 +0200 Subject: [PATCH 5/6] Reference conventions directly and use non-deprecated attributes --- develop-docs/sdk/telemetry/traces/index.mdx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/develop-docs/sdk/telemetry/traces/index.mdx b/develop-docs/sdk/telemetry/traces/index.mdx index d1eddf34a9e54..a33f8430cea92 100644 --- a/develop-docs/sdk/telemetry/traces/index.mdx +++ b/develop-docs/sdk/telemetry/traces/index.mdx @@ -165,12 +165,11 @@ The option controls if attributes with code source information are set on databa The following attributes, or a subset thereof, SHOULD be set on database query spans if the threshold is exceeded. Values for some of the attributes below may be unavailable in some situations for the SDK, and in these cases a subset MAY be provided. -The attributes are described in Sentry's Span Convention Documentation. +The attributes are described in Sentry's Span Convention Documentation. -- code.filepath -- code.lineno -- code.function -- code.namespace +- code.file.path +- code.function.name +- code.line.number ### `dbQuerySourceThresholdMs` @@ -189,12 +188,11 @@ When enabled, the attributes SHOULD be attached only when the time to receive th The following attributes, or a subset thereof, SHOULD be set if the threshold is exceeded. Values for some of the attributes below may be unavailable in some situations for the SDK, and in these cases a subset MAY be provided. -The attributes are described in Sentry's Span Convention Documentation. +The attributes are described in Sentry's Span Convention Documentation. -- code.filepath -- code.lineno -- code.function -- code.namespace +- code.file.path +- code.function.name +- code.line.number ### `httpRequestSourceThresholdMs` From 9c8f1f517324b14b9d7890465a75c8fcbe872c5a Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Wed, 8 Oct 2025 13:44:50 +0200 Subject: [PATCH 6/6] Add default values from Python and Laravel --- develop-docs/sdk/telemetry/traces/index.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/develop-docs/sdk/telemetry/traces/index.mdx b/develop-docs/sdk/telemetry/traces/index.mdx index a33f8430cea92..b937c00c30a09 100644 --- a/develop-docs/sdk/telemetry/traces/index.mdx +++ b/develop-docs/sdk/telemetry/traces/index.mdx @@ -177,6 +177,7 @@ A threshold duration, which MUST be a floating point or integer value. The value specifies, in milliseconds, the duration of a database query before code source information is added. The default value is platform-dependent and SHOULD balance the overhead of adding the information with its utility for queries that exceed the threshold duration for users of the SDK. +In Python and PHP Laravel, the default threshold is 100 milliseconds. ### `enableHttpRequestSource` @@ -201,6 +202,7 @@ The value specifies, in milliseconds, the time between sending an HTTP request a The default value is platform-dependent and SHOULD balance the overhead of adding the information with its utility for request-response cycles that exceed the threshold duration for users of the SDK. + ## `Event` Changes As of writing, transactions are implemented as an extension of the `Event`