Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/2218.yaml
Original file line number Diff line number Diff line change
@@ -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: 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.
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:
20 changes: 17 additions & 3 deletions docs/database/database-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,16 +449,30 @@ 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-):

```java
connection.prepareCall("{call some_stored_procedure}");
```

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
[Microsoft.Data.SqlClient](https://learn.microsoft.com/dotnet/api/microsoft.data.sqlclient.sqlcommand.commandtype):

```csharp
var command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
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 `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
Expand Down
Loading