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
parent 359e055314
commit 3d6ae3fbc3
5 changed files with 98 additions and 33 deletions

View File

@@ -383,7 +383,7 @@ function useGroupCallState(
memberStateEvents,
});
otelGroupCallMembership.onUpdateRoomState(event);
otelGroupCallMembership?.onUpdateRoomState(event);
}
function onReceivedVoipEvent(event: MatrixEvent) {
@@ -393,7 +393,7 @@ function useGroupCallState(
function onSendVoipEvent(event: VoipEvent) {
dispatch({ type: CallEvent.SendVoipEvent, rawEvent: event });
otelGroupCallMembership.onSendEvent(event);
otelGroupCallMembership?.onSendEvent(event);
}
function onUndecryptableToDevice(event: MatrixEvent) {