You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation-genai/opentelemetry-instrumentation-langchain/src/opentelemetry/instrumentation/langchain/callback_handler.py
# We create invoke_agent span for the initial chain for agent. All follow-up chains invoked for agent invocation will not create agent span.
128
+
self._invocation_manager.add_invocation_state(
129
+
run_id, parent_run_id, None
130
+
)
131
+
else:
132
+
# No agent name could be resolved; still register the run_id so that
133
+
# parent-child traversal (e.g. _find_nearest_agent) is not broken for
134
+
# any children of this node.
135
+
self._invocation_manager.add_invocation_state(
136
+
run_id, parent_run_id, None
137
+
)
138
+
else:
139
+
# For unclassified chains, we still want to track them in the invocation manager to maintain the parent-child relationships, even though we won't create spans for them.
Copy file name to clipboardExpand all lines: instrumentation-genai/opentelemetry-instrumentation-langchain/src/opentelemetry/instrumentation/langchain/invocation_manager.py
Copy file name to clipboardExpand all lines: instrumentation-genai/opentelemetry-instrumentation-langchain/src/opentelemetry/instrumentation/langchain/operation_mapping.py
0 commit comments