CodeNameRaven.Runtime (raven_observer_sdk v0.5.4)

Copy Markdown

Provides a runtime façade for integrations to interact with the host system.

Summary

Functions

Returns the stable instance ID of this running node.

Returns the most recent samples for monitor_id across the cluster.

Functions

instance_id()

@spec instance_id() :: String.t()

Returns the stable instance ID of this running node.

recent_samples(monitor_id, opts \\ [])

@spec recent_samples(
  String.t(),
  keyword()
) :: [map()]

Returns the most recent samples for monitor_id across the cluster.

Each sample is returned as a plain map with the following keys:

  • :monitor_id - the monitor's string ID
  • :instance_id - the instance ID (string/binary)
  • :status - string representation of the health status (e.g., "up", "down", "degraded", "unknown")
  • :latency_ms - nullable integer representing latency
  • :status_code - nullable integer representing status code
  • :metrics - map of numeric metrics
  • :collected_at - UTC DateTime of the sample collection
  • :synthetic - boolean indicating if this is a synthetic sample