Add LangWatch Integration (#2608)

* First implementation of LangWatch tracer

* Update to langwatch 0.1.4 to use root span for better control of the all-wrapping trace, workaround for llm not being used for an actual call and better ids on langwatch ui

* Remove dependency from backend base internal and add langwatch docs

* [autofix.ci] apply automated fixes

* Fix using session id for metadata, except if the same as flow_id

* Fix wrong error variable and support for python <3.10 is not necessary given langflow pyproject restrictions

* Bump langwatch to v0.1.4

* [autofix.ci] apply automated fixes

* Remove extra line the popped up

* Fix missing log parameter on method

* Fix mypy issues

* Bump langwatch to v0.1.7 to truncate large documents

* Move docs to the right folder

* chore: update lock

* chore: Update clarifai-grpc to version 10.6.4, cohere to version 5.6.1, langwatch to version 0.1.3, and litellm to version 1.41.23

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
Rogério Chaves 2024-07-16 19:28:57 +02:00 committed by GitHub
commit 89f2f62041
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 578 additions and 147 deletions

View file

@ -0,0 +1,46 @@
import Admonition from "@theme/Admonition";
import ThemedImage from "@theme/ThemedImage";
import useBaseUrl from "@docusaurus/useBaseUrl";
import ZoomableImage from "/src/theme/ZoomableImage.js";
# LangWatch
LangWatch is an all-in-one LLMOps platform for monitoring, observability, analytics, evaluations and alerting for getting user insights and improve your LLM workflows.
To integrate with Langflow, just add your LangWatch API as a Langflow environment variable and you are good to go!
## Step-by-step Configuration
1. Obtain your LangWatch API key from https://app.langwatch.com/
2. Add the following key to Langflow .env file:
```bash
LANGWATCH_API_KEY="your-api-key"
```
or export it in your terminal:
```bash
export LANGWATCH_API_KEY="your-api-key"
```
3. Restart Langflow using `langflow run --env-file .env`
4. Run any project and check the LangWatch dashboard for monitoring and observability.
<ZoomableImage
alt="LangWatch Flow Example"
sources={{
light: useBaseUrl("img/langwatch-flow.png"),
dark: useBaseUrl("img/langwatch-flow.png"),
}}
style={{ width: "100%", margin: "20px auto", boxShadow: "rgba(50, 50, 93, 0.2) 0px 0px 27px" }}
/>
<ZoomableImage
alt="LangSmith Trace"
sources={{
light: useBaseUrl("img/langwatch-trace.png"),
dark: useBaseUrl("img/langwatch-trace.png"),
}}
style={{ width: "100%", margin: "20px auto", background: "red", boxShadow: "rgba(50, 50, 93, 0.2) 0px 0px 27px" }}
/>

BIN
docs/static/img/langwatch-flow.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

BIN
docs/static/img/langwatch-trace.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB