Skip to content

🚀 Feature: use metadata from invoke calls in Langchain to populate span attributes #3213

@zmievsa-semasoftware

Description

@zmievsa-semasoftware

Which component is this feature for?

Langchain Instrumentation

🔖 Feature description

I'd like to add arbitrary data as an attribute for my events and extract it from metadata when using batch and abatch methods. However, currently it doesn't work: attributes do not get populated from metadata.

🎤 Why is this feature needed ?

Otherwise, when using batch, I have no way to correlate errors to data if I disabled prompts. I disable prompts in some places because the data there is sensitive but if an error happens -- we need to be able to at least get an identifier of this data.

✌️ How do you aim to achieve this?

Not sure yet, let's discuss.

🔄️ Additional Information

I tried using callbacks but they are applied outside of traceloop per-workflow span, not inside of it :(

👀 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions