Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions packages/traceloop-sdk/traceloop/sdk/decorators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,12 @@ def _is_async_method(fn):

def _setup_span(entity_name, tlp_span_kind, version):
"""Sets up the OpenTelemetry span and context"""
if tlp_span_kind in [
TraceloopSpanKindValues.WORKFLOW,
TraceloopSpanKindValues.AGENT,
]:
if tlp_span_kind == TraceloopSpanKindValues.WORKFLOW:
set_workflow_name(entity_name)

if tlp_span_kind == TraceloopSpanKindValues.AGENT:
elif tlp_span_kind == TraceloopSpanKindValues.AGENT:
set_agent_name(entity_name)
if context_api.get_value("workflow_name") is None:

@galzilber galzilber Jun 18, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const it please no magic strings

set_workflow_name(entity_name)
Comment on lines +144 to +145

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so if "workflow_name" is none we set entity_name as workflow name.

But if it's not None? It's never set?


span_name = f"{entity_name}.{tlp_span_kind.value}"

Expand Down
Loading