open-telemetry / semantic-conventions

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

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

Open wertzui opened 2 months ago

wertzui commented 2 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 2 months ago

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