Enable/disable opentelemetry based on config/user preference

Add config to set collector URL, obey the same analytics setting as
posthog. Also refactor into a class to make it easier to manage.
This commit is contained in:
David Baker 2023-03-22 11:55:21 +00:00
commit 3d6ae3fbc3
5 changed files with 98 additions and 33 deletions

View file

@ -36,6 +36,13 @@ export interface ConfigOptions {
submit_url: string;
};
/**
* Controls whether to to send OpenTelemetry debugging data to collector
*/
opentelemetry?: {
collector_url: string;
};
// Describes the default homeserver to use. The same format as Element Web
// (without identity servers as we don't use them).
default_server_config?: {