A function can be designated as a Weave Op either manually through a decorator or automatically as part of an enabled integration. When an Op executes, Weave captures detailed information to support your analysis. This article describes the categories of data Weave captures for each Op call so you can understand what is logged and decide whether to adjust the defaults. Weave provides fine-grained control over what is logged; see the linked configuration examples for each category in the following list. Weave captures the following categories of information for each Op call:Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-docs-2661.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- Code capture - Weave captures a representation of the Op’s source code. This includes inline comments as well as recursively capturing the value of variables or the source of non-Op functions that were called. Code capture lets you see what your function was doing even if the change was not saved to your source control system. Weave applies code capture as part of Op versioning, which lets you understand the evolution of your code over time. If you disable code capture, Weave stores a hash value instead.
- Function name, inputs, and outputs - Weave captures the name of the function, but you can override it. Weave captures a JSON-based representation of the inputs and outputs. For inputs, Weave captures the argument name in addition to the value. Weave lets you customize the logging of inputs and outputs—you can specify a function to add, remove, or modify what is logged.
- Op call hierarchy - When an Op is called within the context of another executing Op, Weave captures this relationship, even when an intermediate non-Op function is executing. Weave applies this relationship between Op calls to provide a trace tree.
- Execution status and exceptions - Weave tracks whether a function is executing, finished, or errored. If an exception occurs during execution, Weave records the error message and a stack trace.
- System information - Weave might capture information about which operating system the client is running on, including detailed version information.
- Client information - Weave might capture information about the Weave client itself, such as the programming language in active use and detailed version information for that language and the Weave client library.
- Timing - Weave captures the execution start and end times and applies them to latency calculations.
- Token usage - In some integrations, Weave automatically logs LLM token usage counts.
-
User and run context - Weave associates logging with a W&B user account. Weave captures that account along with any
wandbRun context. - Derived information - Weave might compute derived information from the raw information logged. For example, Weave might calculate a cost estimate based on token usage and the model used. Weave also aggregates some information over calls.
-
Additional information you choose - You can choose to log custom metadata with
weave.attributesas part of your call or attach feedback to a call.
Data Capture Code Capture Client Info System Info