Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wertzui opened this issue Jun 7, 2024 · 1 comment
Open

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

wertzui opened this issue Jun 7, 2024 · 1 comment
Assignees
Labels
area:db enhancement New feature or request

Comments

@wertzui
Copy link

wertzui commented Jun 7, 2024

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

  • db.query.parameter.<key>.value which stores the value as previously db.query.parameter.<key>
  • db.query.parameter.<key>.type which stores the parameter type

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 #866

@trask
Copy link
Member

trask commented Jun 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:db enhancement New feature or request
Projects
Status: Post Stability
Development

No branches or pull requests

3 participants