Edgehog.Files.Telemetry (Clea Edgehog v0.14.1)

Copy Markdown View Source

Edgehog file transfer telemetry.

Events can be emitted on the following topics:

  • [:edgehog, :files, :file_download_request, :start] when a file download request provisioning starts. Metadata contains transfer_type, destination_type, progress_tracked, needs_encoding, tenant_slug, and optionally request_id, device_id, and file_id.
  • [:edgehog, :files, :file_download_request, :stop] when a file download request terminates, either successfully or with a failure. Metadata contains the start metadata plus result (either :ok or :error), reason (either the provisioning outcome, e.g. :ready or :already_ready, or the failure reason), duration (native time), and duration_unit (:native). Measurements contain count, duration (native time), and retries.
  • [:edgehog, :files, :file_upload_request, :start] when a file upload request starts. Metadata contains transfer_type, source_type, progress_tracked, needs_encoding, tenant_slug, and optionally request_id and device_id.
  • [:edgehog, :files, :file_upload_request, :stop] when a file upload request terminates, either successfully or with a failure. Metadata contains the start metadata plus result (either :ok or :error), reason, duration (native time), and duration_unit (:native). Measurements contain count, duration (native time), and retries.

Summary

Functions

Emits a file download request start event and returns the monotonic time the download request started, to be used when emitting the corresponding stop event.

Emits a file upload request start event and returns the monotonic time the upload request started, to be used when emitting the corresponding stop event.

Returns true if telemetry identifiers should be included in event metadata.

Functions

file_download_request_completed(resource, context, started_at, retries \\ 0, reason \\ :ready)

Emits a successful file download request stop event.

file_download_request_failed(resource, context, started_at, retries \\ 0, reason)

Emits a failed file download request stop event.

file_download_request_started(resource, context)

Emits a file download request start event and returns the monotonic time the download request started, to be used when emitting the corresponding stop event.

Returns the start time, computed with System.monotonic_time/0.

file_download_start_event()

file_download_stop_event()

file_upload_request_completed(resource, context, started_at, retries \\ 0, reason \\ :ok)

Emits a successful file upload request stop event.

file_upload_request_failed(resource, context, started_at, retries \\ 0, reason)

Emits a failed file upload request stop event.

file_upload_request_started(resource, context)

Emits a file upload request start event and returns the monotonic time the upload request started, to be used when emitting the corresponding stop event.

Returns the start time, computed with System.monotonic_time/0.

file_upload_start_event()

file_upload_stop_event()

include_identifiers?()

Returns true if telemetry identifiers should be included in event metadata.