Skip to content

Commit ea958bb

Browse files
lrafeeihmstepanek
andauthored
Update newrelic/api/opentelemetry.py
Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
1 parent 98b6285 commit ea958bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

newrelic/api/opentelemetry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def set_attributes(self, attributes):
210210
self.set_attribute(key, value)
211211

212212
def _set_attributes_in_nr(self, otel_attributes=None):
213-
if not (otel_attributes and hasattr(self, "nr_trace") and self.nr_trace):
213+
if not (otel_attributes and getattr(self, "nr_trace", False):
214214
return
215215
for key, value in otel_attributes.items():
216216
self.nr_trace.add_custom_attribute(key, value)

0 commit comments

Comments
 (0)