Skip to content

Commit

Permalink
Improve code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnestoLoma committed Dec 31, 2024
1 parent 7aa1c30 commit 483566b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pyatlan/pkg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ def add_otel_handler(
resource (dict): A dictionary of resource attributes to be associated with the logger.
"""
if OTEL_IMPORTS_AVAILABLE and not has_handler(logger, LoggingHandler):
workflow_node_name = os.getenv("OTEL_WF_NODE_NAME", "")
if workflow_node_name:
if workflow_node_name := os.getenv("OTEL_WF_NODE_NAME", ""):
resource["k8s.workflow.node.name"] = workflow_node_name
logger_provider = LoggerProvider(Resource.create(resource))
otel_log_exporter = OTLPLogExporter(
Expand Down

0 comments on commit 483566b

Please sign in to comment.