Is there a any to link the span/context of the auto inserted LangChainInstrumentation with span manually placed? I've a customized tool where I want extra information. But the spans are disjoint right now
To link the span/context of auto-inserted LangChainInstrumentation with manually placed spans, you need to ensure that the manual spans are created within the context of the auto-instrumented spans. According to Slack Discussion, manual instrumentation is not directly compatible with the usual OpenTelemetry (OTEL) contexts used by LangChain's callback system. However, you can create a custom retriever and use a callback manager similar to LangChain's approach to integrate manual spans.Would you like more detail on how to implement this? Sources:
- Slack Discussion
- Slack Discussion
馃挕聽Hint: Mention RunLLM in the thread for followups.