Observability Tools
SigNoz
The traces generated by Langtrace can be visualized and analyzed using SigNoz.
SigNoz is an open-source observability platform that helps developers monitor their applications and troubleshoot issues. It provides a rich set of features for monitoring and analyzing traces, metrics, and logs.
Setup
- Install langtrace’s SDK and initialize the SDK in your code.
- Sign up and start visualizing the traces on SigNoz
Example
Here’s a quick experiment for a FastAPI based RAG endpoint built using LangChain.
You can find the sample code in this link: https://gist.github.com/karthikscale3/c13a5b7c53820ee297badd3acaa26d58
Steps:
- Get the SigNoz OTLP endpoint and OTLP header to start sending traces to SigNoz cloud
- Run the server with the following code.
OTEL_RESOURCE_ATTRIBUTES=service.name=Langtrace \
OTEL_EXPORTER_OTLP_ENDPOINT="<SIGNOZE_OTLP_ENDPOINT>" \
OTEL_EXPORTER_OTLP_HEADERS="<SIGNOZ_OTLP_HEADER>" \
OTEL_EXPORTER_OTLP_PROTOCOL=grpc \
opentelemetry-instrument uvicorn main:app
That’s it! ✨ 🧙♂️ Enjoy the high cardinality traces on SigNoz.