Scale3-Labs / langtrace-python-sdk

Langtrace SDK for Python Applications
https://langtrace.ai
Apache License 2.0
15 stars 4 forks source link

Trace user feedback with FastAPI #229

Closed bukosabino closed 1 week ago

bukosabino commented 1 week ago

Hello everyone,

Congratulations on your work, I am in love with Langtrace!

However, I have a problem when I follow the documentation on traceuserfeedback

Is it ready to work with FastAPI? Could the main function be an endpoint? If it is an endpoint, spanId and traceId are input parameters that the client has to fill in, and I think this is not the purpose...

Note: I am working with FastAPI, using @with_langtrace_root_span and inject_additional_attributes.

bukosabino commented 1 week ago

Hey, I take a look at the package code and I discover that with_langrace_root_span expects span_id and trace_id and not spanId and traceId. So the example works like a churm if you update this.

Please update the documentation.

Thank you very much!

alizenhom commented 1 week ago

Hey @bukosabino, Apologies for the confusion and really nice catch! will definitely update the docs thanks for pointing out.

if you need any assistance would be more than happy to help

bukosabino commented 1 week ago

I have created a pull request: https://github.com/Scale3-Labs/langtrace-docs/pull/45

@alizenhom

karthikscale3 commented 1 week ago

Thanks @bukosabino for correcting it.