Quick Start Guide
This guide will help you start monitoring Oracle trace messages with OmniView in just a few minutes.Prerequisites
Before you begin, make sure you have:- ✅ Installed OmniView (see Installation)
- ✅ Oracle Instant Client installed and configured
- ✅ Access to an Oracle database with required privileges
- ✅ Created a
settings.jsonconfiguration file
Setup
Create Configuration File
Create a Replace the values with your Oracle database connection details.
settings.json file in your working directory:settings.json
Build OmniView
Build the application from source:This will:
- Build the ODPI-C library
- Compile the Go application with CGO
- Create the
omniviewbinary
Run OmniView
Start OmniView to begin monitoring:Or run the binary directly:Unix/macOS:Windows:On first run, OmniView will:
Auto-update check: On startup, OmniView automatically checks for newer versions from GitHub releases. Development builds (version “dev”) skip this check. To disable updates, build from source without a version flag.
- Initialize BoltDB for local state storage
- Load database configuration from
settings.json - Connect to your Oracle database
- Check and deploy the
OMNI_TRACER_APIpackage - Initialize the
OMNI_TRACER_QUEUEsharded queue - Register your client as a subscriber
- Start listening for trace messages
Send Your First Trace Message
Now that OmniView is running and listening, let’s send a trace message from your Oracle database.Open SQL*Plus or SQL Developer
Connect to your Oracle database as the same user configured in
settings.json.Send a Trace Message
Use the Parameters:
OMNI_TRACER_API.Trace_Message procedure to send a message:message_(CLOB): The trace message content (can be JSON, text, or any format)log_level_(VARCHAR2): Log level -INFO,DEBUG,WARN,ERROR(default:INFO)
How It Works
Behind the Scenes
When you callOMNI_TRACER_API.Trace_Message:
-
Message Creation: A JSON payload is created with metadata:
-
Queue Enqueue: The message is enqueued to
OMNI_TRACER_QUEUE(a sharded Advanced Queue) - Subscriber Delivery: Oracle AQ delivers the message to all registered subscribers
-
OmniView Processing:
- The blocking consumer loop (
blockingConsumerLoop) waits for messages - Bulk dequeue operation retrieves messages in batches (see
main.go:78) - Messages are unmarshaled from JSON (see
tracer_service.go:89) - Each message is formatted and displayed (see
tracer_service.go:101)
- The blocking consumer loop (
The Message Queue
TheOMNI_TRACER_QUEUE is created as a sharded queue for high performance:
- Multiple shards: Default 4 shards for parallel processing
- Multi-subscriber: Multiple OmniView instances can listen simultaneously
- Persistent: Messages are stored until acknowledged
- Blocking dequeue: Efficient waiting without polling
Test Different Log Levels
Try sending messages with different log levels:Integration with PL/SQL Code
Integrate trace messages into your existing PL/SQL packages for debugging:Multiple Subscribers
You can run multiple OmniView instances simultaneously. Each will receive all trace messages: Terminal 1:Graceful Shutdown
To stop OmniView:- Press
Enterin the terminal (as prompted) - Or use
Ctrl+Cfor interrupt signal
- Cancel the context to stop the consumer loop (see
main.go:86) - Close database connections gracefully (see
main.go:57) - Shut down BoltDB (see
main.go:42) - Clean up all resources
Next Steps
API Reference
Learn about the OMNI_TRACER_API procedures and configuration
Architecture
Understand OmniView’s hexagonal architecture and design patterns
Configuration
Explore advanced configuration options and tuning
Development
Build OmniView from source and contribute
Common Issues
No messages appearing in OmniView
No messages appearing in OmniView
Possible causes:
- Message not committed: Ensure you run
COMMIT;after callingTrace_Message - Different schema: Verify you’re connected as the same user in both OmniView and SQL client
- Queue not initialized: Check that “Tracer started” appears in OmniView output
Permission denied errors on startup
Permission denied errors on startup
The database user needs specific privileges. Run this as DBA:
Connection refused or TNS error
Connection refused or TNS error
Verify your
settings.json configuration:- Host is reachable:
ping 127.0.0.1 - Port is correct: Default is
1521 - Service name is correct: Check with
lsnrctl status - Instant Client is in PATH/LD_LIBRARY_PATH
For more configuration options, see the Configuration Guide. Check application logs in BoltDB (
omniview.bolt) for detailed debugging.