# Tracing Built-ins

| Function | Description | OPA | Wasm | [Swift](https://github.com/open-policy-agent/swift-opa) | [Java](https://github.com/open-policy-agent/java-opa-sdk) |
| --- | --- | --- | --- | --- | --- |
| `trace` | `result := trace(note)`  Emits `note` as a `Note` event in the query explanation. Query explanations show the exact expressions evaluated by OPA during policy execution. For example, `trace("Hello There!")` includes `Note "Hello There!"` in the query explanation. To include variables in the message, use `sprintf`. For example, `person := "Bob"; trace(sprintf("Hello There! %v", [person]))` will emit `Note "Hello There! Bob"` inside of the explanation.  **Arguments:**  `note` (string)  the note to include  **Returns:**  `result` (boolean)  always `true` | v0.17.0 | SDK | 0.0.1 | ✗ |

See also: [Debugging](/docs/policy-reference/builtins/opa#debugging) for notes and examples of the related `print` function.