Skip to content

Add support for multiple collector endpoints in one TelemetryManager instance #947

Open

Description

Current library state and problem statement:

Multi user scenario implies that a number of users (greater that 1) can make and receive a Call during 1C3 communication stack life time without library being restarted.

One of the user-dependent context information in case of user being part of restricted/geo-locked cloud may be Telemetry ingestion URL, which must be different from regular production URL due to privacy/security requirements for specific cloud.

Problem statement:
Current 1DS library design allows for 2 ways of configuring ingestion URL;
-At library start , either using defaults or override provided via Setup key.
-At runtime, using ECS configuration.

Main issue with both methods is that the URL is set globally for all events, the ones cached from previous sessions and currently received ones.
Given that events may not be sent immediately but rather could be stored into data base for later processing and sending, there is no guarantee that event stored at any time will be sent with the URL that matches the user context.

In short, current telemetry event do not carry enough user context, they need to respect the user context they were created with.

Additionally, it should be possible to configure ingestion URL-s according to user context without restarting IC3 communications library.

Proposed changes:

Per-user ingestion URL-s

Library needs to have a notion of storing multiple ingestion URLs together with an account/user context.
<std::pair<std::string: Account, std:string URL>>

Event stamping with user context

Event post interface needs to be updated with contextID field, which will represent the account/user context in which event needs to be sent.
Library will add correct ingestion URL to event payload by matching account ID with appropriate URL obtained from configuration.
At event sending time, URL will be read from event properties instead of configuration. This will require SQLite schema change in order to add new field to event storage table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    designArchitecture and designenhancementNew feature or requestiOSiOS related issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions