class ActiveStorage::StructuredEventSubscriber

:nodoc:

def preview(event)

def preview(event)
  emit_event("active_storage.preview",
    key: event.payload[:key],
    duration_ms: event.duration.round(2),
  )
end

def service_delete(event)

def service_delete(event)
  emit_event("active_storage.service_delete",
    key: event.payload[:key],
    duration_ms: event.duration.round(2),
  )
end

def service_delete_prefixed(event)

def service_delete_prefixed(event)
  emit_event("active_storage.service_delete_prefixed",
    prefix: event.payload[:prefix],
    duration_ms: event.duration.round(2),
  )
end

def service_download(event)

def service_download(event)
  emit_event("active_storage.service_download",
    key: event.payload[:key],
    duration_ms: event.duration.round(2),
  )
end

def service_exist(event)

def service_exist(event)
  emit_debug_event("active_storage.service_exist",
    key: event.payload[:key],
    exist: event.payload[:exist],
    duration_ms: event.duration.round(2),
  )
end

def service_mirror(event)

def service_mirror(event)
  emit_debug_event("active_storage.service_mirror",
    key: event.payload[:key],
    checksum: event.payload[:checksum],
    duration_ms: event.duration.round(2),
  )
end

def service_streaming_download(event)

def service_streaming_download(event)
  emit_event("active_storage.service_streaming_download",
    key: event.payload[:key],
    duration_ms: event.duration.round(2),
  )
end

def service_upload(event)

:nodoc:
def service_upload(event)
  emit_event("active_storage.service_upload",
    key: event.payload[:key],
    checksum: event.payload[:checksum],
    duration_ms: event.duration.round(2),
  )
end

def service_url(event)

def service_url(event)
  emit_debug_event("active_storage.service_url",
    key: event.payload[:key],
    url: event.payload[:url],
    duration_ms: event.duration.round(2),
  )
end