DDFS Events and Metrics

Review Events service event types, Audit coverage, and Monitoring metrics for Device Data FHIR Service (DDFS).

You can use metrics, alarms, notifications, and Events rules to monitor DDFS instances and route lifecycle events to downstream OCI services.

DDFS emits Events service events for instance lifecycle operations. DDFS also emits Audit events for read and mutating control-plane operations so that administrators can review who invoked an operation, which resource was affected, and whether the operation completed successfully.

Resource: DDFS instance resources.

Prerequisites

To monitor or route DDFS events, you must have permission to view DDFS resources and to create or manage Events rules in the target compartment. To review related Monitoring charts or Audit records, you must also have permissions to read metrics and Audit logs for the compartment that contains the DDFS instance.

Overview of DDFS Events

DDFS lifecycle operations are asynchronous when they create, update, move, or delete an instance. For these operations, DDFS emits begin and end event types. Use the begin event to detect that the operation was accepted and use the end event to detect the terminal work request result.

For asynchronous Events service events, use data.eventGroupingId to correlate the begin and end events for the same lifecycle operation.

DDFS Event Types

The following Events service event types are registered for DDFS lifecycle operations. Use these values when you create Events rules.

Friendly Name Event Type Operation Phase
Create DDFS instance begin com.oraclecloud.ddfs.createinstance.begin CreateInstance Begin
Create DDFS instance end com.oraclecloud.ddfs.createinstance.end CreateInstance End
Update DDFS instance begin com.oraclecloud.ddfs.updateinstance.begin UpdateInstance Begin
Update DDFS instance end com.oraclecloud.ddfs.updateinstance.end UpdateInstance End
Delete DDFS instance begin com.oraclecloud.ddfs.deleteinstance.begin DeleteInstance Begin
Delete DDFS instance end com.oraclecloud.ddfs.deleteinstance.end DeleteInstance End
Move DDFS instance begin com.oraclecloud.ddfs.changeinstancecompartment.begin ChangeInstanceCompartment Begin
Move DDFS instance end com.oraclecloud.ddfs.changeinstancecompartment.end ChangeInstanceCompartment End

Events rules use the lowercase event type values in the table. Audit log records for the same operations can display operation-cased type values, such as com.oraclecloud.DDFS.CreateInstance.begin.

Audit Event Coverage

DDFS control-plane operations are configured for automated Audit event emission. Audit records are available for synchronous read operations and for asynchronous lifecycle operations.

Operation Audit Event Phase Notes
ListInstances Synchronous Audit event is emitted for list requests.
GetInstance Synchronous Audit event is emitted for get requests.
CreateInstance Begin and end Audit begin and async end records are emitted for create work requests.
UpdateInstance Begin and end Audit begin and async end records are emitted for update work requests.
DeleteInstance Begin and end Audit begin and async end records are emitted for delete work requests.
ChangeInstanceCompartment Begin and end Audit records use move semantics and include source and destination compartment context when available.

Events and Audit Payload Details

Events service payloads

An Events service event contains CloudEvents envelope fields such as eventType, eventTime, and source. Its data object contains DDFS resource context, including the compartment, resource name, and resource OCID. Asynchronous lifecycle events include data.eventGroupingId; use this field to correlate the begin and end events for the same operation.

Events service payloads do not include the Audit-specific data.identity, data.request, data.response, or data.stateChange objects.

Audit record payloads

An Audit record includes the API operation name, event time, source, compartment, resource name or resource OCID, caller identity, request details, and response details when the data is available. For asynchronous operations, use data.eventGroupingId to link the begin and end Audit records for the same operation. data.request.id identifies the API request represented by an individual Audit record; it is not the correlation field for the begin and end records.

An asynchronous end Audit record can include data.response.payload with the work request operation type, such as CREATE_INSTANCE, UPDATE_INSTANCE, MOVE_INSTANCE, or DELETE_INSTANCE, and the terminal work request status. data.stateChange can include lifecycle state, display name, compartment, and tag changes when those details are available.

Do not include protected health information, personally identifiable information, FHIR resource identifiers, patient identifiers, device identifiers, or encounter identifiers in DDFS instance names, tags, Events rule names, or alarm names.

Create an Events rule for DDFS events

Use Events rules to match DDFS event types and deliver matching events to a supported action.

Using the Console
  1. Open the navigation menu and select Observability & Management. Under Events Service, select Rules.
  2. Select the compartment that contains the DDFS instance resources you want to monitor.
  3. Create a rule and add a condition that matches Device Data FHIR Service events or one or more event type values from the DDFS Event Types table.
  4. Select the action that receives matching events, such as a Notifications topic, Functions function, or Streaming stream, and then save the rule.

Using the API

Use the Events API to create rules that match DDFS event types. Use the Monitoring API for alarms and metrics when you monitor service behavior. Use Audit or Logging Search to review Audit records for read operations and lifecycle work requests.

The following condition fragment shows the event type values that you can include in an Events rule.

{
  "eventType": [
    "com.oraclecloud.ddfs.createinstance.begin",
    "com.oraclecloud.ddfs.createinstance.end",
    "com.oraclecloud.ddfs.updateinstance.begin",
    "com.oraclecloud.ddfs.updateinstance.end",
    "com.oraclecloud.ddfs.deleteinstance.begin",
    "com.oraclecloud.ddfs.deleteinstance.end",
    "com.oraclecloud.ddfs.changeinstancecompartment.begin",
    "com.oraclecloud.ddfs.changeinstancecompartment.end"
  ]
}

For metric names, units, and dimensions, see Device Data FHIR Service Metrics Reference.