api/parts/mgmt/tracker

This module is meant to handle event tracking

Description:
  • This module is meant to handle event tracking

Source:

Methods

(static) collectServerData() → {Object}

Description:
  • Get server data

Source:
Returns:

server data

Type
Object

(static) collectServerStats() → {Promise.<Object>}

Description:
  • Get server stats

Source:
Returns:

server stats

Type
Promise.<Object>

(static) enable()

Description:
  • Enable tracking for this server

Source:

(static) getAllData() → {Object}

Description:
  • Get all eligible data

Source:
Returns:

all eligible data

Type
Object

(static) getBulkServer() → {Object}

Description:
  • Get bulk server instance

Source:
Returns:

Countly Bulk instance

Type
Object

(static) getBulkUser(serverInstance) → {Object}

Description:
  • Get bulk user instance

Source:
Parameters:
Name Type Description
serverInstance Object

Countly Bulk server instance

Returns:

Countly Bulk User instance

Type
Object

(static) getSDK() → {Object}

Description:
  • Get SDK instance

Source:
Returns:

Countly NodeJS SDK instance

Type
Object

(static) getSDKData() → {Promise.<Object>}

Description:
  • Query sdks collection for current and previous year (month 0) and combine meta_v2 data

Source:
Returns:

Combined meta_v2 data from all matching documents

Type
Promise.<Object>

(static) isEnabled() → {boolean}

Description:
  • Check if tracking enabled

Source:
Returns:

if enabled

Type
boolean

(static) reportEvent(event)

Description:
  • Report server level event

Source:
Parameters:
Name Type Description
event object

event object

(static) reportEventBulk(events)

Description:
  • Report server level event in bulk

Source:
Parameters:
Name Type Description
events Array

array of event objects

(static) reportUserEvent(id, event)

Description:
  • Report user level event

Source:
Parameters:
Name Type Description
id string

id of the device

event object

event object

(static) uploadBase64FileFromGridFS(base64String) → {Promise.<Object>}

Description:
  • Upload a base64-encoded file from GridFS to the stats server This function handles files stored in GridFS as base64 strings (e.g., data URIs) and decodes them before uploading

Source:
Parameters:
Name Type Description
base64String Object

Picture data

Returns:

Upload result

Type
Promise.<Object>

(inner) hasDockerCGroup() → {boolean}

Description:
  • Check if running in Docker by inspecting cgroup info

Source:
Returns:

if running in docker

Type
boolean

(inner) hasDockerEnv() → {boolean}

Description:
  • Check if running in Docker environment

Source:
Returns:

if running in docker

Type
boolean

(inner) hasDockerMountInfo() → {boolean}

Description:
  • Check if running in Docker by inspecting mountinfo

Source:
Returns:

if running in docker

Type
boolean

(inner) stripTrailingSlash(str) → {string}

Description:
  • Strip traling slashes from url

Source:
Parameters:
Name Type Description
str string

url to strip

Returns:

stripped url

Type
string