monasca_log_api.reference.v3 package

monasca_log_api.reference.v3 module

class Logs[source]

Bases: monasca_log_api.api.logs_api.LogsApi

SUPPORTED_CONTENT_TYPES = set(['application/json'])
VERSION = 'v3.0'
on_post(req, res)[source]

monasca_log_api.reference.v3 module

get_global_dimensions(request_body)[source]

Get the top level dimensions in the HTTP request body.

get_logs(request_body)[source]

Get the logs in the HTTP request body.

read_json_msg_body(req)[source]

Read the json_msg from the http request body and return them as JSON.

Parameters:req – HTTP request object.
Returns:Returns the metrics as a JSON object.
Raises falcon.HTTPBadRequest:
 
class BulkProcessor(logs_in_counter, logs_rejected_counter)[source]

Bases: monasca_log_api.reference.common.log_publisher.LogPublisher

BulkProcessor for effective log processing and publishing.

BulkProcessor is customized version of monasca_log_api.reference.common.log_publisher.LogPublisher that utilizes processing of bulk request inside single loop.

send_message(logs, global_dimensions=None, log_tenant_id=None)[source]

Sends bulk package to kafka

Parameters:
  • logs (list) – received logs
  • global_dimensions (dict) – global dimensions for each log
  • log_tenant_id (str) – tenant who sent logs

Table Of Contents

Previous topic

monasca_log_api.reference.v2 package

Next topic

monasca_log_api.v2.common package

Project Source

This Page