Monitoring

Data for monitoring

We are currently processing several types of events for monitoring:

  1. request (any http request)

  2. error (failed http request)

  3. sdk usage & sdk estimation

  4. licensing

Every event is a point in the time series. The point is represented as union of the following data:

  • series name

  • start event time

  • tags, indexed data in storage, dictionary: keys - string tag names, values - string, integer, float

  • fields, non indexed data in storage, dictionary: keys - string tag names, values - string, integer, float

Monitoring series

  • Requests series.

    Triggered on every request. Each point contains a data about corresponding request (execution time and etc).

    Requests series tags

    tag name

    description

    service

    always “luna-handlers”

    route

    concatenation of a request method and a request resource (POST:/extractor)

    status_code

    http status code of response

    Requests series fields

    fields

    description

    request_id

    request id

    execution_time

    request execution time

    Requests series additional tags

    tag name

    resource

    description

    handler_id

    /handlers/{handlerId}/events

    handler ID

    Requests series additional fields

    fields

    resource

    description

    download_images_time

    /detector

    time taken to download the image from Image Store

    save_warps_time

    /detector

    time taken to save warps to Image Store

    save_samples_time

    /extractor

    time taken to save samples to Image Store

    load_face_samples_time

    /extractor

    time taken to download the face sample from Image Store

    load_face_samples_time

    /extractor/upgrade

    time taken to download the face sample from Image Store

    load_body_samples_time

    /extractor/upgrade

    time taken to download the body sample from Image Store

    save_face_attributes_time

    /extractor/upgrade

    time taken to save face attributes to Luna Faces

    save_event_attributes_time

    /extractor/upgrade

    time taken to save event attributes to Luna Faces

    load_images_for_processing_time

    /handlers/{handlerId}/events

    time taken to load image for processing from request

    face_sample_storage_policy_time

    /handlers/{handlerId}/events

    time taken to save face samples to Image Store

    body_sample_storage_policy_time

    /handlers/{handlerId}/events

    time taken to save body samples to Image Store

    image_origin_storage_policy_time

    /handlers/{handlerId}/events

    time taken to save image origins to Image Store

    face_attribute_storage_policy_time

    /handlers/{handlerId}/events

    time taken to save face attributes to Image Store

    face_storage_policy_time

    /handlers/{handlerId}/events

    time taken to save face with avatar to Luna Faces

    event_storage_policy_time

    /handlers/{handlerId}/events

    time taken to save event to Luna Events

    notification_storage_policy_time

    /handlers/{handlerId}/events

    time taken to send notification to Luna Sender

    match_policy_time

    /handlers/{handlerId}/events

    time taken for matching

    match_policy_time

    /verifiers/{verifierId}/verifications

    time taken for matching

    load_images_for_processing_time

    /sdk

    time taken to load image for processing from request

    load_images_for_processing_time

    /iso

    time taken to load image for processing from request

  • Errors series.

    Triggered on failed request. Each point contains error_code of luna error.

    Errors series tags

    tag name

    description

    service

    always “luna-handlers”

    route

    concatenation of a request method and a request resource (POST:/extractor)

    status_code

    http status code of response

    error_code

    Luna Platform error code

    Errors series fields

    fields

    description

    request_id

    request id

    Errors series additional tags

    tag name

    resource

    description

    handler_id

    /handlers/{handlerId}/events

    handler ID

  • Usages_statistic series.

    Triggered on every request involving some SDK estimations. Each point contains data on the number of estimations performed.

    Usages_statistic series tags

    tag name

    description

    service

    always “luna-handlers”

    Usages_statistic series fields

    fields

    description

    face_detector_usages

    face detector usages count

    landmarks68_detector_usages

    landmarks68 detector usages count

    head_pose_estimator_usages

    head pose estimator usages count

    liveness_estimator_usages

    liveness estimator usages count

    mask_estimator_usages

    mask estimator usages count

    emotion_estimator_usages

    emotion estimator usages count

    mouth_estimator_usages

    mouth estimator usages count

    eye_estimator_usages

    eye estimator usages count

    gaze_estimator_usages

    gaze estimator usages count

    glasses_estimator_usages

    glasses estimator usages count

    face_warp_quality_estimator_usages

    face warp quality estimator usages count

    face_basic_attributes_extractor_usages

    face basic attributes extractor usages count

    face_descriptor_extractor_usages

    face descriptor extractor usages count

    body_detector_usages

    body detector estimator usages count

    body_descriptor_extractor_usages

    body descriptor extractor usages count

    iso_estimator_usages

    iso estimator usages count

    face_quality_estimator_usages

    face quality estimator usages count

    body_basic_attributes_estimator_usages

    body basic attribute estimator usages count

    body_upper_attributes_estimator_usages

    body upper attribute estimator usages count

    body_accessories_estimator_usages

    body accessory estimator usages count

  • Sdkloop_task series.

    SDK monitoring series. Triggered on every request involving some SDK estimations. Each point contains data on estimations performed.

    Sdkloop_task series tags

    tag name

    description

    service

    always “luna-handlers”

    image_count

    number of images in request

    Sdkloop_task series fields

    fields

    description

    execution_time

    task execution time in seconds

  • Image_load series.

    SDK monitoring series. Triggered on every request involving some SDK estimations. Each point contains data on estimations performed.

    Image_load series tags

    tag name

    description

    service

    always “luna-handlers”

    format

    image format, i.e. “JPEG”, “PNG”, etc.

    exif

    whether the exif loading is on

    autorotated

    whether the autorotation is on

    Image_load series fields

    fields

    description

    execution_time

    image loading time in seconds

    size

    image size in bytes

    height

    image height in pel

    width

    image width in pel

  • Image_orientation series.

    SDK monitoring series. Triggered on every request involving image orientation estimations. Each point contains data on estimations performed.

    Image_orientation series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Image_orientation series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Face_detection series.

    SDK monitoring series. Triggered on every request involving face detection estimations. Each point contains data on estimations performed.

    Face_detection series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    estimate_68landmarks

    estimate 68landmarks

    Face_detection series fields

    fields

    description

    execution_time

    estimation time in seconds

    detection_height

    detection height

    image_height

    image height

    detection_width

    detection width

    image_width

    image width

    detection_count

    detection count

  • Face_redetection series.

    SDK monitoring series. Triggered on every request involving face redetection estimations. Each point contains data on estimations performed.

    Face_redetection series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    estimate_68landmarks

    estimate 68landmarks

    Face_redetection series fields

    fields

    description

    execution_time

    estimation time in seconds

    detection_height

    detection height

    image_height

    image height

    detection_width

    detection width

    image_width

    image width

    detection_count

    detection count

    bbox_width

    bbox width

    bbox_height

    bbox height

  • Face_warp series.

    SDK monitoring series. Triggered on every request involving face warp estimations. Each point contains data on estimations performed.

    Face_warp series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Face_warp series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Face_warp_quality series.

    SDK monitoring series. Triggered on every request involving face warp quality estimations. Each point contains data on estimations performed.

    Face_warp_quality series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Face_warp_quality series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Emotions series.

    SDK monitoring series. Triggered on every request involving emotions estimations. Each point contains data on estimations performed.

    Emotions series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Emotions series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Eyes series.

    SDK monitoring series. Triggered on every request involving eyes estimations. Each point contains data on estimations performed.

    Eyes series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Eyes series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Gaze_direction series.

    SDK monitoring series. Triggered on every request involving gaze direction estimations. Each point contains data on estimations performed.

    Gaze_direction series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Gaze_direction series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Glasses series.

    SDK monitoring series. Triggered on every request involving glasses estimations. Each point contains data on estimations performed.

    Glasses series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Glasses series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Head_pose series.

    SDK monitoring series. Triggered on every request involving head pose estimations. Each point contains data on estimations performed.

    Head_pose series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Head_pose series fields

    fields

    description

    execution_time

    estimation time in seconds

  • LivenessV1 series.

    SDK monitoring series. Triggered on every request involving livenessv1 estimations. Each point contains data on estimations performed.

    LivenessV1 series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    LivenessV1 series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Mask series.

    SDK monitoring series. Triggered on every request involving mask estimations. Each point contains data on estimations performed.

    Mask series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Mask series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Mouth_state series.

    SDK monitoring series. Triggered on every request involving mouth state estimations. Each point contains data on estimations performed.

    Mouth_state series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Mouth_state series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Basic_attributes series.

    SDK monitoring series. Triggered on every request involving basic attributes estimations. Each point contains data on estimations performed.

    Basic_attributes series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Basic_attributes series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Aggregated_basic_attributes series.

    SDK monitoring series. Triggered on every request involving aggregated basic attributes estimations. Each point contains data on estimations performed.

    Aggregated_basic_attributes series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Aggregated_basic_attributes series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Face_descriptor series.

    SDK monitoring series. Triggered on every request involving face descriptor estimations. Each point contains data on estimations performed.

    Face_descriptor series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    descriptor_version

    descriptor version

    Face_descriptor series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Aggregated_face_descriptor series.

    SDK monitoring series. Triggered on every request involving aggregated face descriptor estimations. Each point contains data on estimations performed.

    Aggregated_face_descriptor series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    descriptor_version

    descriptor version

    Aggregated_face_descriptor series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Body_detection series.

    SDK monitoring series. Triggered on every request involving body detection estimations. Each point contains data on estimations performed.

    Body_detection series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    estimate_17landmarks

    estimate 17landmarks

    Body_detection series fields

    fields

    description

    execution_time

    estimation time in seconds

    detection_height

    detection height

    image_height

    image height

    detection_width

    detection width

    image_width

    image width

    detection_count

    detection count

  • Body_redetection series.

    SDK monitoring series. Triggered on every request involving body redetection estimations. Each point contains data on estimations performed.

    Body_redetection series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    estimate_17landmarks

    estimate 17landmarks

    Body_redetection series fields

    fields

    description

    execution_time

    estimation time in seconds

    detection_height

    detection height

    image_height

    image height

    detection_width

    detection width

    image_width

    image width

    detection_count

    detection count

    bbox_width

    bbox width

    bbox_height

    bbox height

  • Body_warp series.

    SDK monitoring series. Triggered on every request involving body warp estimations. Each point contains data on estimations performed.

    Body_warp series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Body_warp series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Body_attributes series.

    SDK monitoring series. Triggered on every request involving body attributes estimations. Each point contains data on estimations performed.

    Body_attributes series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    Body_attributes series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Body_descriptor series.

    SDK monitoring series. Triggered on every request involving body descriptor estimations. Each point contains data on estimations performed.

    Body_descriptor series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    descriptor_version

    descriptor version

    Body_descriptor series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Aggregated_body_descriptor series.

    SDK monitoring series. Triggered on every request involving aggregated body descriptor estimations. Each point contains data on estimations performed.

    Aggregated_body_descriptor series tags

    tag name

    description

    service

    always “luna-handlers”

    batch_size

    batch size for estimations

    descriptor_version

    descriptor version

    Aggregated_body_descriptor series fields

    fields

    description

    execution_time

    estimation time in seconds

  • Licensing series.

    Triggered on each request with liveness estimation if liveness balance expired. Each point contains license check data.

    Licensing series tags

    tag name

    description

    service

    always “luna-handlers”

    license_status

    license status (“ok”, “warning”, “error”, “exception”)

    Licensing series fields

    fields

    description

    liveness_balance

    number of liveness estimations before the license expires

    warnings

    license warning messages

    errors

    license errors messages

Database

Monitoring is implemented as data sending to an influx database. You can setup your database credentials in configuration file in section “monitoring”.

Plugins

You can realize your own plugin for sending monitoring data. See plugins

Module request monitoring plugin example

class luna_handlers.crutches_on_wheels.plugins.plugin_examples.request_monitoring_plugin_example.BaseRequestMonitoringPlugin(app)[source]

Base class for requests monitoring.

abstract async flushPointToMonitoring(points, logger)[source]

All plugins must realize this method.

This function call after end of request

Parameters:
  • points – points for monitoring which corresponding the request

  • logger – logger

Return type:

None

async handleEvent(points, logger)[source]

Handle event

Parameters:
  • *args – positional arg for event handler function

  • **kwargs – named arg for event handler function

class luna_handlers.crutches_on_wheels.plugins.plugin_examples.request_monitoring_plugin_example.RequestMonitoringPlugin(app)[source]

Example plugin sends a request data for monitoring to third-party source. Only one instance of this class exist during the program execution.

async close()[source]

Stop plugin.

Close all open connections and ect

async flushPointToMonitoring(points, logger)[source]

Callback for sending a request monitoring data.

Parameters:
  • points – point for monitoring which corresponding the request

  • logger – logger

Return type:

None

async initialize()[source]

Initialize plugin.

Close all open connections and ect