diff --git a/edx_arch_experiments/datadog_monitoring/code_owner/datadog.py b/edx_arch_experiments/datadog_monitoring/code_owner/datadog.py index 9802010..3b38fcb 100644 --- a/edx_arch_experiments/datadog_monitoring/code_owner/datadog.py +++ b/edx_arch_experiments/datadog_monitoring/code_owner/datadog.py @@ -13,7 +13,7 @@ def on_span_start(self, span): """ Adds code owner span tag for celery run spans at span creation. """ - if hasattr(span, 'name') and span.name == 'celery.run': + if getattr(span, 'name') == 'celery.run': # We can use this for celery spans, because the resource name is more predictable # and available from the start. For django requests, we'll instead continue to use # django middleware for setting code owner.