lib/opentelemetry/instrumentation/trilogy/patches/client.rb in opentelemetry-instrumentation-trilogy-0.59.1 vs lib/opentelemetry/instrumentation/trilogy/patches/client.rb in opentelemetry-instrumentation-trilogy-0.59.2

- old
+ new

@@ -48,10 +48,17 @@ attributes: client_attributes(sql).merge!( OpenTelemetry::Instrumentation::Trilogy.attributes ), kind: :client ) do |_span, context| - propagator.inject(sql, context: context) + if propagator && sql.frozen? + sql = +sql + propagator.inject(sql, context: context) + sql.freeze + elsif propagator + propagator.inject(sql, context: context) + end + super(sql) end end private