24 Database Observability and OpenTelemetry
ADBS Native Observability (OpenTelemetry) provides native, in-database OpenTelemetry tracing and logging.
In larger application scenarios where the Oracle AI Database is but one of many co-dependent applications running on the system, this export of standardized trace and log information as OpenTelemetry objects allows better system analysis.
Oracle AI
Database offers native observability with the DBMS_OBSERVABILITY PL/SQL procedures. This enables distributed tracing and metrics.
Tracing outputs OpenTelemetry (OTel) spans and correlates them with Oracle AI Database logs. This allows integrated analysis with external tools that collect OTel information from all applications on the system.
Oracle AI Database native observabililty collects database activity in-memory, minimizing performance overhead, and asynchronously exports trace data to configured destinations that include disk and OTel endpoints.
Administration and fine-tuning of the service is performed via DBMS_OBSERVABILITY package. This allows you to:
- Enable or disable observability services and options
- Configure endpoints for exporting traces and logs to OpenTelemetry collectors
- Manage credentials for secure communication with external endpoints
- View current service status and endpoint configurations
Basic configuration example:
-- Enable observability service
EXEC dbms_observability.enable_service;
-- Disable a service option
EXEC dbms_observability.disable_service_option(option_id => dbms_observability.show_extra_metadata);
-- Configure a credential
EXEC dbms_observability.create_credential(credential_name => 'my_trace_cred', username => 'usr', password => 'welcome1');
-- Configure an endpoint
EXEC dbms_observability.add_endpoint(endpoint_type => dbms_observability.otel_traces, endpoint => 'https://example.com:1234/v1/traces', credential_name => 'my_trace_cred' );
-- View current service status
EXEC dbms_observability.show_pdb_service_status(pdb_id => NULL);
The final implementation of this command looks as follows:
set serveroutput on;
declare
config VARCHAR2;
begin
select dbms_observability.show_service_status(info_level => dbms_observability.runtime_info) into config;
dbms_output.put_line(config);
end;
/
Oracle AI Database trace and log data is natively correlated and exported, making SQL performance issues easier to analyze alongside the rest of the application stack.