From c2e6a4f37bd718d4ff867ea356a4761b1bff1ad0 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 2 May 2025 09:09:12 -0700 Subject: [PATCH 1/9] ansisql --- docs/database/database-spans.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index 5fcf63c3d8..1ed780ed3a 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -458,7 +458,7 @@ name or target). command.CommandText = "some_stored_procedure"; ``` - the corresponding `db.query.summary` is `EXECUTE some_stored_procedure`, `db.query.text` is not populated. + the corresponding `db.query.summary` is `CALL some_stored_procedure`, `db.query.text` is not populated. Semantic conventions for individual database systems or specialized instrumentations MAY specify a different `db.query.summary` format as long as produced summary remains From e5deddebb3d688f0adfc457c2682db519251b337 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 2 May 2025 09:12:00 -0700 Subject: [PATCH 2/9] chlog --- .chloggen/2218.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .chloggen/2218.yaml diff --git a/.chloggen/2218.yaml b/.chloggen/2218.yaml new file mode 100644 index 0000000000..44b62a68d5 --- /dev/null +++ b/.chloggen/2218.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: db + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Update stored procedure summary example + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [ 2218 ] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: From 5b5f28e9612792c256d49184f5ed83b87ce558b6 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 2 May 2025 11:30:45 -0700 Subject: [PATCH 3/9] Update docs/database/database-spans.md Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com> --- docs/database/database-spans.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index 1ed780ed3a..d0f65854b9 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -458,7 +458,7 @@ name or target). command.CommandText = "some_stored_procedure"; ``` - the corresponding `db.query.summary` is `CALL some_stored_procedure`, `db.query.text` is not populated. + the corresponding `db.query.summary` is `EXECUTE some_stored_procedure`, `db.query.text` is not populated. The `EXECUTE` statement is SQL Server's means to invoke a stored procedure. If the database system uses a different keyword for executing a stored procedure then that keyword SHOULD be used (e.g., `CALL some_stored_procedure`). Semantic conventions for individual database systems or specialized instrumentations MAY specify a different `db.query.summary` format as long as produced summary remains From 3b4fee8225071358aa57ee81592e919881e197a0 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 2 May 2025 11:32:00 -0700 Subject: [PATCH 4/9] format --- docs/database/database-spans.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index d0f65854b9..775c1de48a 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -458,7 +458,11 @@ name or target). command.CommandText = "some_stored_procedure"; ``` - the corresponding `db.query.summary` is `EXECUTE some_stored_procedure`, `db.query.text` is not populated. The `EXECUTE` statement is SQL Server's means to invoke a stored procedure. If the database system uses a different keyword for executing a stored procedure then that keyword SHOULD be used (e.g., `CALL some_stored_procedure`). + the corresponding `db.query.summary` is `EXECUTE some_stored_procedure`, + `db.query.text` is not populated. The `EXECUTE` statement in this case is + SQL Server's means to invoke a stored procedure. + If the database system uses a different keyword for executing a stored procedure + then that keyword SHOULD be used (e.g., `CALL some_stored_procedure`). Semantic conventions for individual database systems or specialized instrumentations MAY specify a different `db.query.summary` format as long as produced summary remains From b579ea16a1460fa15932a3459970fcd8b1a12439 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 2 May 2025 11:39:13 -0700 Subject: [PATCH 5/9] both generic and sql server specific examples --- docs/database/database-spans.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index 775c1de48a..e843511d6b 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -449,8 +449,15 @@ name or target). the corresponding `db.query.summary` is `SELECT "song list" 'artists'`. -- Stored procedure is executed using convenience API such as one available in - [Microsoft.Data.SqlClient](https://learn.microsoft.com/dotnet/api/microsoft.data.sqlclient.sqlcommand.commandtype): +- Stored procedure is executed using a convenience API such as one available in + [JDBC](https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#prepareCall-java.lang.String-): + + the corresponding `db.query.summary` is `CALL some_stored_procedure`, + `db.query.text` is not populated. `CALL` in this case is the SQL standard + keyword to invoke a stored procedure. + +- Stored procedure is executed using Microsoft SQL Server driver's convenience API + [Microsoft.Data.SqlClient](https://learn.microsoft.com/dotnet/api/microsoft.data.sqlclient.sqlcommand.commandtype): ```csharp var command = new SqlCommand(); @@ -458,11 +465,9 @@ name or target). command.CommandText = "some_stored_procedure"; ``` - the corresponding `db.query.summary` is `EXECUTE some_stored_procedure`, - `db.query.text` is not populated. The `EXECUTE` statement in this case is - SQL Server's means to invoke a stored procedure. - If the database system uses a different keyword for executing a stored procedure - then that keyword SHOULD be used (e.g., `CALL some_stored_procedure`). + the corresponding `db.query.summary` is `EXECUTE some_stored_procedure`, + `db.query.text` is not populated. `EXECUTE` in this case is Microsoft + SQL Server's keyword to invoke a stored procedure. Semantic conventions for individual database systems or specialized instrumentations MAY specify a different `db.query.summary` format as long as produced summary remains From de4fc6c2a214581a75460a7356df0c2266e115b9 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 2 May 2025 11:46:58 -0700 Subject: [PATCH 6/9] more clarification --- docs/database/database-spans.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index e843511d6b..08becad49b 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -452,8 +452,12 @@ name or target). - Stored procedure is executed using a convenience API such as one available in [JDBC](https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#prepareCall-java.lang.String-): + ```java + connection.prepareCall("{call some_stored_procedure}"); + ``` + the corresponding `db.query.summary` is `CALL some_stored_procedure`, - `db.query.text` is not populated. `CALL` in this case is the SQL standard + `db.query.text` is not populated. `CALL` in this case is the ANSI SQL standard keyword to invoke a stored procedure. - Stored procedure is executed using Microsoft SQL Server driver's convenience API @@ -466,8 +470,9 @@ name or target). ``` the corresponding `db.query.summary` is `EXECUTE some_stored_procedure`, - `db.query.text` is not populated. `EXECUTE` in this case is Microsoft - SQL Server's keyword to invoke a stored procedure. + `db.query.text` is not populated. Note that Microsoft SQL Server does not + support the SQL Standard `CALL` keyword, but uses instead `EXECUTE` + to invoke a stored procedure. Semantic conventions for individual database systems or specialized instrumentations MAY specify a different `db.query.summary` format as long as produced summary remains From 9dc044e447091e7d1d2617e327f107164f715976 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 2 May 2025 11:49:54 -0700 Subject: [PATCH 7/9] more --- docs/database/database-spans.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index 08becad49b..9f2c87d14a 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -456,8 +456,8 @@ name or target). connection.prepareCall("{call some_stored_procedure}"); ``` - the corresponding `db.query.summary` is `CALL some_stored_procedure`, - `db.query.text` is not populated. `CALL` in this case is the ANSI SQL standard + the corresponding `db.query.summary` is `call some_stored_procedure`, + `db.query.text` is not populated. Note that `CALL` is the SQL standard keyword to invoke a stored procedure. - Stored procedure is executed using Microsoft SQL Server driver's convenience API From 6ae4c97af01f8c4ebadce1c79bb19e4c68054af5 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 2 May 2025 11:50:38 -0700 Subject: [PATCH 8/9] format --- docs/database/database-spans.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index 9f2c87d14a..912ffc4bf5 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -469,10 +469,10 @@ name or target). command.CommandText = "some_stored_procedure"; ``` - the corresponding `db.query.summary` is `EXECUTE some_stored_procedure`, - `db.query.text` is not populated. Note that Microsoft SQL Server does not - support the SQL Standard `CALL` keyword, but uses instead `EXECUTE` - to invoke a stored procedure. + the corresponding `db.query.summary` is `EXECUTE some_stored_procedure`, + `db.query.text` is not populated. Note that Microsoft SQL Server does not + support the SQL Standard `CALL` keyword, but uses instead `EXECUTE` + to invoke a stored procedure. Semantic conventions for individual database systems or specialized instrumentations MAY specify a different `db.query.summary` format as long as produced summary remains From ec6fa38576685c61efcee3a5e91227c45f48af02 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 2 May 2025 11:53:30 -0700 Subject: [PATCH 9/9] Update .chloggen/2218.yaml --- .chloggen/2218.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chloggen/2218.yaml b/.chloggen/2218.yaml index 44b62a68d5..54b53ab8dd 100644 --- a/.chloggen/2218.yaml +++ b/.chloggen/2218.yaml @@ -10,7 +10,7 @@ change_type: bug_fix component: db # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Update stored procedure summary example +note: Clarify `db.query.summary` for stored procedures # Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. # The values here must be integers.