rails-otel-context 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d2e72559008d91dce5419a16fd46e12cf3e9f40f1d5767458e2c4f1a4bf15b2c
|
|
4
|
+
data.tar.gz: 86e841a066551ed02d85c15f0af9276c394de50586d70d07bc1cb588b2e33de4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7326aaca0ef8d0db842513355e10002deedc16cafa5823c39a8dfaf983a05e794482cea8cf371fcac2b42c7f52861e1c1b104ae97f0c3a2ffcbbc0107d8eb6e4
|
|
7
|
+
data.tar.gz: b4621bcc0dedd6d721268ed1f738f482335ab7953b45d8957655e62b046a5da1322cb76f40e1acbab20e2605dad17b06178f210067ce4dd3c3f1905b533f69b7
|
|
@@ -201,6 +201,7 @@ module RailsOtelContext
|
|
|
201
201
|
|
|
202
202
|
formatter = RailsOtelContext.configuration.span_name_formatter
|
|
203
203
|
return unless formatter
|
|
204
|
+
return unless span.respond_to?(:attributes) && span.attributes&.key?('db.system')
|
|
204
205
|
|
|
205
206
|
# Dup deferred to here: set_attribute calls above need only the original ctx keys.
|
|
206
207
|
# The formatter may inspect code.namespace/code.function already on the span.
|
|
@@ -143,6 +143,7 @@ module RailsOtelContext
|
|
|
143
143
|
|
|
144
144
|
def apply_span_name_formatter(span, ar_context)
|
|
145
145
|
return unless @span_name_formatter
|
|
146
|
+
return unless span.respond_to?(:attributes) && span.attributes&.key?('db.system')
|
|
146
147
|
|
|
147
148
|
original_name = span.name
|
|
148
149
|
new_name = @span_name_formatter.call(original_name, ar_context)
|