Create LLM Monitoring Application¶
- Go to Agent Monitoring > Application List.
- Click "Create Application".
- Select the LLM Monitoring Application Tab.
Integration Types¶
Upon entering the create application page, it currently supports Integrating Langfuse by default:
Access Configuration¶
Three types are supported here:
Access Other Models/Frameworks
Access Python¶
1. Install Dependencies¶
2. Initialize Client¶
3. Verify Connection¶
You can use langfuse.auth_check() to verify if the connection is successful. It is not recommended to use this in production as it adds latency to your application.
from langfuse import Langfuse
# Initialize (via parameter construction)
langfuse = Langfuse(
public_key="app_id",
secret_key="llm_d9f06c320a9***6e9807",
host="https://llm-openway.guance.com"
)
# Verify connection. This is a synchronous call, not recommended for production. This method is only for verifying configuration.
if langfuse.auth_check():
print("Langfuse client is authenticated and ready!")
If the connection fails, you might encounter the following error:
langfuse.api.resources.commons.errors.unauthorized_error.UnauthorizedError: status_code: 401, body: {}
This error usually indicates that the App ID or Client Token is incorrect. Please check your parameter configuration.
For more details and end-to-end examples, refer to Python.
Access JS/TS¶
Note
This configuration is only applicable to Langfuse JS/TS SDK v4. v3 is not currently supported.
1. Install Dependencies¶
Click to view more package information.
2. Register Credentials¶
Set the following environment variables in your application environment. Ensure you have a .env file in your project root and a package like dotenv to load the variables.
LANGFUSE_SECRET_KEY="llm_122f6b85d0c7454fa0f9*****d360"
LANGFUSE_PUBLIC_KEY="pk-lf-..."
LANGFUSE_BASE_URL="https://llm-openway.guance.com",
3. Initialize OpenTelemetry¶
Langfuse SDK tracing is built on OpenTelemetry, so you need to set up the OpenTelemetry SDK. The LangfuseSpanProcessor is the key component for sending traces to Langfuse.
import { NodeSDK } from "@opentelemetry/sdk-node";
import { LangfuseSpanProcessor } from "@langfuse/otel";
const sdk = new NodeSDK({
spanProcessors: [new LangfuseSpanProcessor()],
});
sdk.start();
Click to view the Ollama integration example.
For more details and end-to-end examples, refer to JS/TS.
Access Others¶
If you need to integrate other models/frameworks, such as: DeepSeek, Ollama, LangChain, Dify, etc., refer to the Langfuse official documentation for configuration.
Fill in Variables in Code¶
Fill in the following information on the right side of the page:
| Field | Description |
|---|---|
| Application Name | Custom application name |
| Application ID | Public key, only supports English letters, numbers, underscores. Used to attribute data to the current application in traces, logs, and metrics. |
| Service Address | Fill in the Dataway gateway address |
| Client Token | Automatically generated after application creation, used to send data from user devices |
What is Client Token?
After creating the application, the system will automatically generate a Client Token for you. This token is used to send data from user devices.
For more details, refer to Client Token Management.
After confirming the information is correct, click Create to complete the LLM monitoring application integration.