There are different options available to control the level of Weave tracing in your application, depending on your environment and needs.Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-john-wbdocs-2044-rename-serverless-products.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Environment variable
In situations where you want to unconditionally disable tracing for the entire program, you can set the environment variableWEAVE_DISABLED=true.
WEAVE_DISABLED is read only once, at function-definition time. This variable cannot be used to toggle tracing at runtime.
Client initialization
Sometimes, you may want to conditionally enable tracing for a specific initialization based on some condition. In this case, you can initialize the client with thedisabled flag in init settings.
- Python
- TypeScript
Context manager
To conditionally disable tracing for a specific block of code, you can use a tracing context manager. Usewith tracing_disabled() to suppress tracing only for the function calls executed inside the with block. Use it in application code to scope which calls should not be logged.
- Python
- TypeScript
- Python
- TypeScript