lib/opentelemetry/instrumentation/pg/patches/connection.rb in opentelemetry-instrumentation-pg-0.19.2 vs lib/opentelemetry/instrumentation/pg/patches/connection.rb in opentelemetry-instrumentation-pg-0.20.0
- old
+ new
@@ -67,15 +67,15 @@
# module size limit! We can't win here unless we want to start
# abstracting things into a million pieces.
def span_attrs(kind, *args) # rubocop:disable Metrics/AbcSize
if kind == :query
operation = extract_operation(args[0])
- sql = obfuscate_sql(args[0])
+ sql = obfuscate_sql(args[0]).to_s
else
statement_name = args[0]
if kind == :prepare
- sql = obfuscate_sql(args[1])
+ sql = obfuscate_sql(args[1]).to_s
lru_cache[statement_name] = sql
operation = 'PREPARE'
else
sql = lru_cache[statement_name]
operation = 'EXECUTE'