Skip to content

Commit

Permalink
fix: otelsql attr passthrough when reporting db stats
Browse files Browse the repository at this point in the history
  • Loading branch information
scott20315 committed Dec 23, 2022
1 parent 90051fe commit 6172588
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion otelsql/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func OpenDB(connector driver.Connector, opts ...Option) *sql.DB {

func sqlOpenDB(connector driver.Connector, instrum *dbInstrum) *sql.DB {
db := sql.OpenDB(connector)
ReportDBStatsMetrics(db, WithMeterProvider(instrum.meterProvider))
ReportDBStatsMetrics(db, WithMeterProvider(instrum.meterProvider), WithAttributes(instrum.attrs...))
return db
}

Expand Down

0 comments on commit 6172588

Please sign in to comment.