Reference Source
public class | source

MetricsCollector

Extends:

devapt-core-common/dist/js/base/settingsable~Settingsable → MetricsCollector

Metrics collector base class.

Constructor Summary

Public Constructor
public

constructor(arg_settings: Immutable.Map, arg_log_context: string): nothing

Metrics collector constructor.

Member Summary

Public Members
public

Class test flag.

public

Metrics reducer instance.

public

Metrics server name.

public

Metrics state instance.

Private Members
private

Metrics collector status.

Method Summary

Public Methods
public

close(): nothing

Flush and close the metrics collector.

public

flush(): nothing

Flush pending metrics records.

public

Get the metrics collector status: CREATED, INITIALIZED, CLOSED.

public

Get the metrics collector status: CREATED, INITIALIZED, CLOSED.

public

init(): nothing

Initialize metrics collector.

public

process_record(arg_metrics_record: MetricsRecord): nothing

Process a metrics record.

public

process_values(arg_metrics_values: object): nothing

Process metrics record values.

public

send_metrics(arg_type: string, arg_values: array): boolean

Send metrics message.

Public Constructors

public constructor(arg_settings: Immutable.Map, arg_log_context: string): nothing source

Metrics collector constructor.

Params:

NameTypeAttributeDescription
arg_settings Immutable.Map

instance settings map.

arg_log_context string

trace context string.

Return:

nothing

Public Members

public is_metrics_collector: boolean source

Class test flag.

public metrics_reducer: MetricsReducer source

Metrics reducer instance.

public metrics_server_name: string source

Metrics server name.

public metrics_state: MetricsState source

Metrics state instance.

Private Members

private $state: string source

Metrics collector status.

Public Methods

public close(): nothing source

Flush and close the metrics collector.

Return:

nothing

public flush(): nothing source

Flush pending metrics records.

Return:

nothing

public get_state_values(): string source

Get the metrics collector status: CREATED, INITIALIZED, CLOSED.

Return:

string

_ status string

public get_status(): string source

Get the metrics collector status: CREATED, INITIALIZED, CLOSED.

Return:

string

_ status string

public init(): nothing source

Initialize metrics collector.

Return:

nothing

public process_record(arg_metrics_record: MetricsRecord): nothing source

Process a metrics record.

Params:

NameTypeAttributeDescription
arg_metrics_record MetricsRecord

metrics record.

Return:

nothing

public process_values(arg_metrics_values: object): nothing source

Process metrics record values.

Params:

NameTypeAttributeDescription
arg_metrics_values object

metrics record values.

Return:

nothing

public send_metrics(arg_type: string, arg_values: array): boolean source

Send metrics message.

Params:

NameTypeAttributeDescription
arg_type string

metrics type string.

arg_values array

metrics values array.

Return:

boolean