Stop guessing! Debug effortlessly!
You and your AI can now see anything.
Meet omniray β OMNIVISER's X-RAY
Built and battle-tested at OMNIVISER.
Demo app built to show omniray in action β every function call traced live with timing and I/O.
- Live
function,error,I/Oandperformancetracing in clear logs. - Full context for you and your AI.
- No decorators, no config files β just one call.
Install:
pip install omniray # console tracing
pip install omniray[otel] # + OpenTelemetry spans
pip install omniwrap # wrapping engine only (custom wrappers)Requires Python >= 3.12. omniray is built on omniwrap β installing omniray installs both.
Add to your code:
from omniwrap import wrap_all
from omniray import create_trace_wrapper
wrap_all(create_trace_wrapper())Run your app:
OMNIRAY_LOG=true python app.pyOutput:
13:44 INFO: ββ BigRedButton.press
13:44 INFO: ββ ββ BigRedButton.pre_launch_check
13:44 INFO: β ββ ββ MissileLauncher.authenticate
13:44 INFO: β β ββ (52.80ms) MissileLauncher.authenticate
13:44 INFO: β ββ (53.34ms) BigRedButton.pre_launch_check
13:44 INFO: ββ ββ BigRedButton.launch_sequence
13:44 INFO: β ββ ββ MissileLauncher.arm_warhead
13:44 INFO: β β ββ (124.97ms) MissileLauncher.arm_warhead
13:44 INFO: β ββ ββ MissileLauncher.select_target
13:44 INFO: β β IN: {
13:44 INFO: β β "coordinates": "51.5074Β° N, 0.1278Β° W"
13:44 INFO: β β }
13:44 INFO: β β ββ (34.74ms) MissileLauncher.select_target
13:44 INFO: β ββ ββ MissileLauncher.fire
13:44 INFO: β β ββ (202.05ms) MissileLauncher.fire [SLOW]
13:44 INFO: β β OUT: {
13:44 INFO: β β "status": "BOOM!",
13:44 INFO: β β "impact": true,
13:44 INFO: β β "debris_radius_km": 4.2
13:44 INFO: β β }
13:44 INFO: β ββ (363.92ms) BigRedButton.launch_sequence [SLOW]
13:44 INFO: ββ (418.23ms) BigRedButton.press [SLOW]
- Zero-touch instrumentation β One call wraps every function and method in your codebase. No
@decoratoron each function, no manual setup per module. - Live call tree β See the full call hierarchy in your terminal as it happens, with color-coded timing (green/yellow/red) and
[SLOW]tags on bottlenecks. Unlike cProfile or py-spy, there's no post-mortem step. - OpenTelemetry bridge β Flip one flag to export spans to Jaeger, Datadog, or any OTel-compatible backend. Cherry-pick which functions get spans.
- Production-safe β Never masks exceptions, never wraps dunders or properties, skips already-wrapped functions. Designed to be safe even if accidentally left on.
@tracedecorator β Per-function control over logging, I/O capture, and OTel spans- I/O logging β Log function arguments and return values for selected functions
- Conditional skip β Skip tracing for health checks or noisy functions via
skip_if - Selective OpenTelemetry β Enable OTel spans on specific functions without global overhead
- Custom wrappers β Build your own wrappers with the omniwrap engine
- Configuration β Control paths, exclusions, and behavior via
pyproject.tomland env vars
~250 ns per wrapped call (omniwrap). ~17 us per traced call with console output (omniray). A typical request tracing 50 functions adds under 1 ms.
omniray never wraps: dunder methods, properties, exception classes, already-wrapped functions, imported objects, functions decorated with @trace, or its own package. Exceptions are never masked β if your function raises, the exception propagates unchanged.
| Variable | Type | Default | Description |
|---|---|---|---|
OMNIWRAP |
bool | false |
Enable/disable wrapping when enabled=None is passed to wrap_all() |
The remaining omniray flags use a tri-state system:
trueβ enabledfalseβ kill switch (overrides all decorator parameters, cannot be turned back on per-function)- unset β local decides (decorator parameters or defaults apply)
| Variable | Type | Default | Description |
|---|---|---|---|
OMNIRAY_LOG |
bool | unset | Console tree output |
OMNIRAY_LOG_INPUT |
bool | unset | Log function arguments (requires OMNIRAY_LOG) |
OMNIRAY_LOG_OUTPUT |
bool | unset | Log function return values (requires OMNIRAY_LOG) |
OMNIRAY_LOG_COLOR |
bool | true |
ANSI colors in console output |
OMNIRAY_LOG_STYLE |
str | auto |
Box-drawing style: unicode, ascii, or auto |
OMNIRAY_OTEL |
bool | unset | OpenTelemetry span creation |
Read the full docs β configuration, API reference, performance benchmarks, examples, and more.
See CONTRIBUTING.md for development setup and guidelines.
Apache 2.0 β see LICENSE for details.

