fix(opentelemetry): close span even if no logs are sent (#8367)
* fix(opentelemetry): close span even if no logs are sent * changelogpull/8392/head
parent
d87b9fe0dc
commit
03240ad7dc
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- "opentelemetry callback plugin - close spans always (https://github.com/ansible-collections/community.general/pull/8367)."
|
|
@ -402,7 +402,8 @@ class OpenTelemetrySource(object):
|
|||
if not disable_logs:
|
||||
# This will avoid populating span attributes to the logs
|
||||
span.add_event(task_data.dump, attributes={} if disable_attributes_in_logs else attributes)
|
||||
span.end(end_time=host_data.finish)
|
||||
# Close span always
|
||||
span.end(end_time=host_data.finish)
|
||||
|
||||
def set_span_attributes(self, span, attributes):
|
||||
""" update the span attributes with the given attributes if not None """
|
||||
|
|
Loading…
Reference in New Issue