-
Notifications
You must be signed in to change notification settings - Fork 281
feat(telemetry): add dynamic "db.system" attribute to OTEL spans #5019
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
Conversation
fn system_name(&self) -> &'static str { | ||
self.name() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only used in query-engine/core/src/executor/execute_operation.rs
.
For other metrics spans, the logic lives in:
provider = "mongodb":
query-engine/connectors/mongodb-query-connector/src/root_queries/mod.rs`- SQL providers: their corresponding
quaint
native module.
WASM Query Engine file Size
|
…nge member variable to constant
CodSpeed Performance ReportMerging #5019 will not alter performanceComparing Summary
|
query-engine/connectors/mongodb-query-connector/src/root_queries/mod.rs
Outdated
Show resolved
Hide resolved
query-engine/connectors/mongodb-query-connector/src/root_queries/mod.rs
Outdated
Show resolved
Hide resolved
query-engine/connectors/mongodb-query-connector/src/root_queries/mod.rs
Outdated
Show resolved
Hide resolved
…t_queries/mod.rs Co-authored-by: Alexey Orlenko <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! A couple more nits, and fix the rustfmt issue, and feel free to merge afterwards 💯
This PR closes prisma/prisma#21472.
It applies the
db.system
attribute tometrics
spans accoding to https://opentelemetry.io/docs/specs/semconv/database/database-spans/.Here's the breakdown of how
db.system
is set for each connector:provider = "postgres"
→ `db.system = "postgresql"provider = "cockroachdb"
→ `db.system = "cockroachdb"provider = "mysql"
→db.system = "mysql"
db.system = "mariadb"
at this moment.provider = "sqlite"
→db.system = "sqlite"
provider = "sqlserver"
→db.system = "mssql"
provider = "mongodb"
→db.system = "mongodb"
Closes OTEL-237.
/integration