otel for call start, end and mute

This is send over zipkin.
And it uses a posthog exporter to export events to posthog
using a _otel prefix
This commit is contained in:
Timo K 2023-03-10 10:33:54 +01:00
commit 4c59638d00
7 changed files with 490 additions and 12 deletions

View file

@ -385,6 +385,22 @@ export class PosthogAnalytics {
this.capture(eventName, properties, options);
}
public async trackFromSpan(
{ eventName, ...properties },
options?: CaptureOptions
): Promise<void> {
if (this.identificationPromise) {
// only make calls to posthog after the identificaion is done
await this.identificationPromise;
}
if (
this.anonymity == Anonymity.Disabled ||
this.anonymity == Anonymity.Anonymous
)
return;
this.capture(eventName, properties, options);
}
public startListeningToSettingsChanges(): void {
// Listen to account data changes from sync so we can observe changes to relevant flags and update.
// This is called -