Membrane.Instrumentation (Membrane Video Transcode v0.1.0)

Copy Markdown View Source

Runtime-configurable instrumentation for Membrane video transcoding pipelines.

Summary

Types

config()

@type config() :: keyword()

Functions

attach_default(handler_id, fun, config \\ nil)

@spec attach_default(term(), :telemetry.handler_function(), term()) ::
  :ok | {:error, :already_exists}

config()

@spec config() :: config()

custom_metrics_enabled?()

@spec custom_metrics_enabled?() :: boolean()

default_events()

@spec default_events() :: [[atom()]]

derive_trace(parent_trace, opts \\ [])

detach(handler_id)

@spec detach(term()) :: :ok | {:error, :not_found}

emit(event_suffix, measurements, metadata)

@spec emit([atom()], map(), map()) :: :ok

emit_frame_stage(component, trace, stage, measurements \\ %{}, metadata \\ %{})

@spec emit_frame_stage(
  atom(),
  Membrane.Instrumentation.FrameTrace.t() | nil,
  atom(),
  map(),
  map()
) ::
  :ok

emit_frame_stage_from_token(component, token, stage, measurements \\ %{}, metadata \\ %{})

@spec emit_frame_stage_from_token(
  atom(),
  Membrane.Instrumentation.TraceToken.t() | nil,
  atom(),
  map(),
  map()
) :: :ok

enabled?()

@spec enabled?() :: boolean()

ensure_started()

@spec ensure_started() :: :ok

frame_metrics_enabled?()

@spec frame_metrics_enabled?() :: boolean()

list_sessions()

@spec list_sessions() :: [term()]

mark_trace(trace, stage, attrs \\ %{})

measure(event_suffix, metadata, fun)

@spec measure([atom()], map(), (-> {term(), map(), map()} | term())) :: term()

routes()

@spec routes() :: map()

sampled_trace(opts \\ [])

@spec sampled_trace(keyword()) :: Membrane.Instrumentation.FrameTrace.t() | nil

snapshot(name)

@spec snapshot(term()) :: {:ok, map()} | {:error, :not_found}

start_reporter(opts \\ [])

@spec start_reporter(keyword()) :: GenServer.on_start()

start_session(opts)

@spec start_session(keyword()) :: {:ok, term()} | {:error, term()}

stop_session(name)

@spec stop_session(term()) :: :ok

update_session(name, opts)

@spec update_session(term(), keyword()) :: :ok | {:error, term()}