Reference Source
public class | source

MetricsHttpRecord

Extends:

MetricsRecord → MetricsHttpRecord

Metric class for HTTP servers.

Constructor Summary

Public Constructor
public

constructor(Http: object, Http: object): nothing

MetricsHttpRecord constructor.

Member Summary

Public Members
public

Class test flag.

public

Request instance.

public

Response instance.

public

Server instance.

public

Metrics record values.

Method Summary

Public Methods
public

after(): nothing

Executed after request processing.

public

before(): nothing

Executed before request processing.

public

Returns request id or a self generated unique id.

public

Returns client ip address or undefined.

public

Returns processing latency (response time).

public

Returns process id.

public

Returns client port or undefined.

public

Returns client security token or undefined.

public

iteration(): nothing

Executed at each request processing iteration.

Inherited Summary

From class MetricsRecord
public

Class test flag.

public

Metrics record name.

public

Metrics record values.

public

after(): nothing

Executed after request processing.

public

before(): nothing

Executed before request processing.

public

Returns metrics series name.

public

Returns metrics values plain object.

public

iteration(): nothing

Executed at each request processing iteration.

Public Constructors

public constructor(Http: object, Http: object): nothing source

MetricsHttpRecord constructor.

Override:

MetricsRecord#constructor

Params:

NameTypeAttributeDescription
Http object

request object (Request class instance).

Http object

response object (Response class instance).

Return:

nothing

Public Members

public is_metrics_http_record: boolean source

Class test flag.

public req: object source

Request instance.

public res: object source

Response instance.

public server: Server source

Server instance.

public values: object source

Metrics record values.

Override:

MetricsRecord#values

Public Methods

public after(): nothing source

Executed after request processing.

Override:

MetricsRecord#after

Return:

nothing

public before(): nothing source

Executed before request processing.

Override:

MetricsRecord#before

Return:

nothing

public get_id(): string source

Returns request id or a self generated unique id.

Return:

string

request ID.

public get_ip(): string source

Returns client ip address or undefined.

Return:

string

server IP.

public get_latency(): string source

Returns processing latency (response time).

Return:

string

request processing latency.

public get_pid(): string source

Returns process id.

Return:

string

process PID.

public get_port(): string source

Returns client port or undefined.

Return:

string

server port.

public get_token(): string source

Returns client security token or undefined.

Return:

string

security token.

public iteration(): nothing source

Executed at each request processing iteration.

Override:

MetricsRecord#iteration

Return:

nothing