@@ -111,23 +111,28 @@ Each database query generates a span with rich attributes:
111111
112112#### Custom Attributes
113113
114- - ` otel.instrumentation.postgres.query.duration_ms ` : Query duration in milliseconds
115- - ` otel.instrumentation.postgres.query.duration_seconds ` : Query duration in seconds
116- - ` otel.instrumentation.postgres.query.parameter_count ` : Number of query parameters
117- - ` otel.instrumentation.postgres.query.has_where ` : Whether query has WHERE clause
118- - ` otel.instrumentation.postgres.query.has_join ` : Whether query has JOIN clause
119- - ` otel.instrumentation.postgres.query.has_order_by ` : Whether query has ORDER BY clause
120- - ` otel.instrumentation.postgres.query.has_limit ` : Whether query has LIMIT clause
121- - ` otel.instrumentation.postgres.query.complexity ` : Estimated query complexity (low/medium/high)
122- - ` otel.instrumentation.postgres.query.type ` : Query type (read/write)
114+ - ` db.parameter_count ` : Number of query parameters
115+ - ` db.duration_ms ` : Query duration in milliseconds
116+ - ` db.duration_seconds ` : Query duration in seconds
117+ - ` db.query.has_where ` : Whether query has WHERE clause
118+ - ` db.query.has_join ` : Whether query has JOIN clause
119+ - ` db.query.has_order_by ` : Whether query has ORDER BY clause
120+ - ` db.query.has_limit ` : Whether query has LIMIT clause
121+ - ` db.query.complexity ` : Estimated query complexity (low/medium/high)
122+ - ` db.query.type ` : Query type (read/write/schema/unknown)
123+ - ` db.result.row_count ` : Number of rows returned (for arrays)
124+
125+ #### Query Parameters (when enabled)
126+
127+ - ` db.query.parameter.0 ` , ` db.query.parameter.1 ` , etc.: Individual query parameters (sanitized)
123128
124129### Metrics
125130
126131- ` db.client.operations.duration ` : Histogram of query durations
127- - ` otel.instrumentation.postgres .requests` : Counter of total queries
128- - ` otel.instrumentation.postgres .errors` : Counter of failed queries
129- - ` otel.instrumentation.postgres .connections` : Counter of database connections
130- - ` otel.instrumentation.postgres.connection .duration` : Histogram of connection durations
132+ - ` db.client .requests` : Counter of total queries
133+ - ` db.client .errors` : Counter of failed queries
134+ - ` db.client .connections` : Counter of database connections
135+ - ` db.client.connections .duration` : Histogram of connection durations
131136
132137## Advanced Usage
133138
0 commit comments