Skip to content

Commit

Permalink
chore: enable Style/CollectionCompact
Browse files Browse the repository at this point in the history
  • Loading branch information
arielvalentin committed Dec 26, 2022
1 parent 809e3cd commit f9ed8ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Lint/SymbolConversion:
Metrics/ParameterLists:
Enabled: false
Style/CollectionCompact:
Enabled: false
Enabled: true
Style/FetchEnvVar:
Enabled: false
Style/GlobalStdStream:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def span_attrs(kind, *args)
attrs = { 'db.operation' => validated_operation(operation), 'db.postgresql.prepared_statement_name' => statement_name }
attrs['db.statement'] = sql unless config[:db_statement] == :omit
attrs.merge!(OpenTelemetry::Instrumentation::PG.attributes)
attrs.reject! { |_, v| v.nil? }
attrs.compact!

[span_name(operation), client_attributes.merge(attrs)]
end
Expand Down Expand Up @@ -131,7 +131,7 @@ def client_attributes
}
attributes['peer.service'] = config[:peer_service] if config[:peer_service]

attributes.merge(transport_attrs).reject { |_, v| v.nil? }
attributes.merge(transport_attrs).compact
end

def transport_addr
Expand Down

0 comments on commit f9ed8ba

Please sign in to comment.