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

[bug] OpenTelemetry.Instrumentation.EntityFrameworkCore v1.0.0-beta.10 - Devart.Data.Oracle is missing db.statement tag and has wrong db.system value #2462

Closed
vladajankovic opened this issue Jan 14, 2025 · 2 comments · Fixed by #2465 · May be fixed by #2466
Labels
bug Something isn't working comp:instrumentation.entityframeworkcore Things related to OpenTelemetry.Instrumentation.EntityFrameworkCore

Comments

@vladajankovic
Copy link
Contributor

Component

OpenTelemetry.Instrumentation.EntityFrameworkCore

Package Version

Package Name Version
OpenTelemetry.Api 1.9.0
OpenTelemetry 1.8.1
TBD TBD

Runtime Version

net8.0

Description

Package versions:

  • Devart.Data.Oracle v10.3.104
  • Devart.Data.Oracle.EFCore v10.3.105.8
  • OpenTelemetry.Instrumentation.EntityFrameworkCore v1.0.0-beta.10

The providerName for Devart.Data.Oracle is "Devart.Data.Oracle.Entity.EFCore", and not "Devart.Data.Oracle.EFCore", which misses the correct switch case and executes the default case db.system="other_sql" Source Code

Also, an exception is thrown on this line when Fetchers are used in a specific case when the command is CommandType.Text, and the db.statement is not set.

Steps to Reproduce

Use these package versions:

  • Devart.Data.Oracle v10.3.104
  • Devart.Data.Oracle.EFCore v10.3.105.8
  • OpenTelemetry.Instrumentation.EntityFrameworkCore v1.0.0-beta.10

Expected Result

Activity class to have tags db.system="oracle" and db.statement that contains the sql statement

Actual Result

Activity class has tag db.system="other_sql" and the db.statement tag is missing

Additional Context

No response

@vladajankovic vladajankovic added the bug Something isn't working label Jan 14, 2025
@github-actions github-actions bot added the comp:instrumentation.entityframeworkcore Things related to OpenTelemetry.Instrumentation.EntityFrameworkCore label Jan 14, 2025
@Kielek
Copy link
Contributor

Kielek commented Jan 14, 2025

@vladajankovic, would you like to contribute fixes (PRs)?

I think, that it will be better to have 2 separate, one for db.system, the second for the db.statement. Please remember to include CHANGELOG entries with brief descriptions.

@vladajankovic
Copy link
Contributor Author

@Kielek Sure thing 😄 I will make 2 PRs tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working comp:instrumentation.entityframeworkcore Things related to OpenTelemetry.Instrumentation.EntityFrameworkCore
Projects
None yet
2 participants