uptrace / opentelemetry-go-extra

OpenTelemetry instrumentations for Go
https://uptrace.dev/get/instrument/
BSD 2-Clause "Simplified" License
314 stars 72 forks source link

[otelgorm] gorm turns on prepared statement, and metrics cannot be used #133

Open shuqingzai opened 3 months ago

shuqingzai commented 3 months ago

When PrepareStmt: true is set in gorm, the assertion fails, resulting in the inability to use metrics

See: Caches Prepared Statement

source: https://github.com/uptrace/opentelemetry-go-extra/blob/e41a0f223a916c275b50432d96bf88874c899faf/otelgorm/otelgorm.go#L58

image