open-telemetry / semantic-conventions

Defines standards for generating consistent, accessible telemetry across a variety of domains
Apache License 2.0
268 stars 173 forks source link

Split `db.query.parameter.<key>` to include the parameter type #1131

Open wertzui opened 5 months ago

wertzui commented 5 months ago

Area(s)

area:db

Is your change request related to a problem? Please describe.

When sending a command to a database, the parameters may have a type associated with them (in MSSQL they always have, not sure about other databases). At the moment only the value of the parameter is stored, but not the type.

Describe the solution you'd like

Split db.query.parameter.<key> into

Describe alternatives you've considered

One possibility would be to store the type as part of the value, like

db.query.parameter.foo=42 (Int32)

However parsing this now need special logic, especially for strings.

Additional context

Related to https://github.com/open-telemetry/semantic-conventions/pull/866

trask commented 4 months ago

Discussed in db semconv meeting, and suggestion is to keep db.query.parameter.<key> and introduce db.query.parameter.type.<key>