The :telemetry events Octoroom emits. Measurements are maps of numbers;
metadata always includes room_id where there is a room.
Joining, step by step (attach_default_logger/1 logs these):
[:octoroom, :participant, :connected]: a participant's own media is up, after its first publish (and after each publish on a new session). Measured by the server, in ms:duration_ms(join to connected),before_publish_ms(join to the publish arriving: the client's mic prompt and candidate gathering),publish_ms(creating its Cloudflare session and pushing its tracks) andconnect_ms(the answer to the client reporting it connected). Measured by the client, when it sends them (the browser client does):client_join_ms,client_media_ms(getUserMedia, with any permission prompt),client_ice_ms(the wait for a first ICE candidate),client_publish_msandclient_connect_ms. Metadataid,sourcesand, from the client,ice_timed_out.[:octoroom, :participant, :first_pull]: the first pull into a connected participant's session finished, so it hears someone. Measurementsduration_ms(since joining),since_connected_ms,tracks; metadataid.[:octoroom, :outlet, :live]: a worker's output sent its first packet, so listeners can pull it. Until then nobody hears it. Measurementsduration_ms(since the outlet started); metadataname,worker_id.
Cloudflare:
[:octoroom, :cloudflare, :request]: one HTTP attempt. Measurementsduration_ms; metadatamethod,path,result(:okor:error).[:octoroom, :peer, :connect]: a worker's peer connection to Cloudflare came up. Measurementsduration_ms(from the peer's start); metadataworker_id.[:octoroom, :pull, :stop]: a batched pull finished, from the Cloudflare call to the browser's answer. Measurementsduration_ms,tracks; metadataparticipant_id.
Rooms and participants:
[:octoroom, :room, :start]: metadatarun,recovered(the previous run didn't stop cleanly).[:octoroom, :room, :stop]: metadatareason.[:octoroom, :room, :recovered]: a recovered room's grace period ended. Measurementsghosts: tracks still held for participants who never came back.[:octoroom, :participant, :join]: metadataid.[:octoroom, :participant, :resume]: metadataid,kind(:rejoinwhen the room kept running,:adoptwhen its Cloudflare session was adopted by a new run).[:octoroom, :participant, :leave]: metadataid,reason.
Workers and failures:
[:octoroom, :worker, :start]: metadataid,module,resumed.[:octoroom, :worker, :exit]: a worker the room didn't stop. Metadataid,reason.[:octoroom, :failure]: something will be retried with backoff, or, withgiven_up: true, won't be. Measurementscount; metadataid(participant id,:workeror:media),name,reason,given_up.[:octoroom, :policy, :error]: a room module callback raised, threw, exited or returned the wrong shape, and the room kept its last good answer (seeOctoroom.Room). Emitted when a failure starts or changes, not on every reconcile. Metadatacallback(:mount,:workers,:subscriptionsor:update_meta),participant_id(the listener, or the participant being updated; nil otherwise),reason.[:octoroom, :janitor, :sweep]: measurementsdeleted_rooms.
Summary
Functions
Logs a line for each step of a join, to see where the time goes
Detaches the handler attach_default_logger/1 attached.
Every event name above, for :telemetry.attach_many/4.
Functions
Logs a line for each step of a join, to see where the time goes:
[info] Octoroom room-1 4f2a connected in 3412 ms: join 80, media 600, ice 2001 (timed out), publish 410, connect 190
[info] Octoroom room-1 4f2a hears someone 905 ms after connecting (4317 ms after joining)
[info] Octoroom room-1 output assistant/voice live after 2210 msOptions: :level (default :info). Call it once, e.g. in your
application's start/2; detach_default_logger/0 undoes it.
Detaches the handler attach_default_logger/1 attached.
Every event name above, for :telemetry.attach_many/4.