Skip to content

Commit

Permalink
Sacrifice for the linting gods ☠️
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotc committed Jul 26, 2024
1 parent 26b1b32 commit aee73ed
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/datadog/tracing/contrib/mysql2/instrumentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ def query(sql, options = {})
private

def inject_propagation(span, sql, trace_op)
propagation_mode = Contrib::Propagation::SqlComment::Mode.new(datadog_configuration[:comment_propagation], datadog_configuration[:append])
propagation_mode = Contrib::Propagation::SqlComment::Mode.new(
datadog_configuration[:comment_propagation],
datadog_configuration[:append]
)

Contrib::Propagation::SqlComment.annotate!(span, propagation_mode)
Contrib::Propagation::SqlComment.prepend_comment(
Expand Down
5 changes: 4 additions & 1 deletion lib/datadog/tracing/contrib/pg/instrumentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ def trace(name, sql: nil, statement_name: nil, block: nil)
Contrib::Analytics.set_sample_rate(span, analytics_sample_rate) if analytics_enabled?

if sql
propagation_mode = Contrib::Propagation::SqlComment::Mode.new(comment_propagation, datadog_configuration[:append])
propagation_mode = Contrib::Propagation::SqlComment::Mode.new(
comment_propagation,
datadog_configuration[:append]
)
Contrib::Propagation::SqlComment.annotate!(span, propagation_mode)
propagated_sql_statement = Contrib::Propagation::SqlComment.prepend_comment(
sql,
Expand Down
4 changes: 3 additions & 1 deletion lib/datadog/tracing/contrib/trilogy/instrumentation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def query(sql)

Contrib::SpanAttributeSchema.set_peer_service!(span, Ext::PEER_SERVICE_SOURCES)

propagation_mode = Contrib::Propagation::SqlComment::Mode.new(comment_propagation, datadog_configuration[:append])
propagation_mode = Contrib::Propagation::SqlComment::Mode.new(
comment_propagation, datadog_configuration[:append]
)

Contrib::Propagation::SqlComment.annotate!(span, propagation_mode)
sql = Contrib::Propagation::SqlComment.prepend_comment(
Expand Down

0 comments on commit aee73ed

Please sign in to comment.