Python SDK settings
Required options
llm_license=
llm.whatap.server.host=
The Python SDK can be used with an APM project and an LLMOBS project together. The values related to the LLM project must be tagged in these options.
llm_enabled=true
This option enables the LLM logsink pack and metric collection. When you use LLMOBS, this option must be set to true.
Recognizing LLM API hosts
llm_api_hosts=localhost:8000,api.openai.com:443
This option lets the agent treat calls to LLM API endpoints that automatic instrumentation does not know (vLLM, LiteLLM, a private gateway, and so on) as LLM calls. The httpc driver marks calls going to those hosts with the LLM API driver.
Entering model prices manually
llm_model_pricing=gpt-4o|2.50|10.00|1.25,gpt-4o-mini|0.15|0.60|0.075,my-custom-model|1.00|5.00
You can specify the price per token of a model manually. The configured value takes the highest precedence even when the actual cost is recognized.
Format: model|input_per_1m|output_per_1m|cached_per_1m
-
4 fields
-
Models are separated by commas
-
The fourth field (cached) is optional and can be left empty or omitted
User blocking
llm_blocked_users=u-1024,abuse@example.com
Blocks LLM calls of the specified user IDs. The default is an empty string (""), which blocks nothing.
- Separate user IDs with commas (,). User IDs are case-insensitive.
- User IDs are the same as the
user_idvalues collected in Configuring Session & User ID. - A blocked call is returned as a connection error (for example,
APIConnectionError) of the client library the application uses to call the LLM API. Configure your application to handle this error. - The blocked point is recorded as a
WhaTap: LLM call blocked for user …message step, which you can check in the Table View of the LLM trace details. - Supported in Python SDK 2.2.1 or later.
Collecting HTTP calls in LLM workflows
llm_httpc_step_enabled=true
Collects HTTP calls made within an LLM workflow (MCP, REST tool calls, and so on) together with LLM steps. The default is true. If set to false, only LLM API calls are collected. Supported in Python SDK 2.2.1 or later.
You can enter options such as llm_blocked_users directly in whatap.conf, or check and modify them per application in Management > SDK Settings in the left menu. Modifying options on the SDK Settings screen requires project edit permission; without it, you can only view the values. For options whose input field is disabled on the SDK Settings screen, set them in whatap.conf.
