Commit Graph

1698 Commits

Author SHA1 Message Date
David Baker 2cd549cdc8 Merge pull request #982 from vector-im/dbkr/otel_flatten_include_booleans
Include booleans in flattened OpenTelemetry object
2023-04-04 17:26:20 +01:00
Robin e0089a0aee Merge pull request #958 from robintown/forced-opt-in
Opt into analytics by default during the beta
2023-04-04 09:27:01 -04:00
Robin 61a0534984 Merge pull request #983 from robintown/rejoin-analytics
Track call rejoins
2023-04-04 09:18:40 -04:00
David Baker 29223b62ad Merge pull request #980 from vector-im/dbkr/display_name_on_call_spans
Add displayname on call spans
2023-04-04 10:26:24 +01:00
Robin Townsend a52251befa Track call rejoins
Call rejoins will be one of the KPIs we track in PostHog to measure call quality. I've also reverted the previous behavior which logged all OpenTelemetry spans to PostHog, since we should only be sending small, anonymized bits of data there.
2023-04-03 21:05:13 -04:00
David Baker 30f75c6cd2 Don't pass null / undefined as attribute value 2023-04-03 17:41:40 +01:00
David Baker 8fa23b7da9 Include booleans in flattened OpenTelemetry object 2023-04-03 16:58:29 +01:00
David Baker 3a7983d2de Add displayname on call spans 2023-04-03 14:31:17 +01:00
David Baker e870188be3 Merge pull request #961 from vector-im/dbkr/otel
OpenTelemetry
2023-03-31 14:25:34 +01:00
David Baker dc725f90a9 Fix confusing comment 2023-03-31 11:12:10 +01:00
David Baker a1aca7bdf2 Fix lying comment 2023-03-31 11:10:05 +01:00
David Baker 773f2e009d Typo 2023-03-31 10:58:12 +01:00
David Baker 5e6c33b3b5 Let otel know we're joining before trying to join
Otherwise it starts getting calls being created before the group call
span exists and we get call spans not associated with the group call
span.

(What 74b218af8c should have been)
2023-03-31 10:30:01 +01:00
David Baker 72403d1aea Revert 74b218af8c
Comitted entirely the wrong thing
2023-03-31 10:26:33 +01:00
David Baker 74b218af8c Let otel know we're joining before trying to join
Otherwise it starts getting calls being created before the group call
span exists and we get call spans not associated with the group call
span.
2023-03-30 17:19:13 +01:00
David Baker c2b78d59c6 Add more events:
* VoIP events received
 * Call errors
 * Group call errors
 * Undecryptable to-device events
2023-03-30 16:54:10 +01:00
David Baker 21458c8840 Call the same leave method everywhere
So we end the group call span whenever we leasve the call, including
if we close the page.
2023-03-30 13:03:58 +01:00
David Baker f96ce8985d Only enable otel if we have a collector URL 2023-03-29 16:04:11 +01:00
David Baker 848e28ef92 Change allowed origin to https://* as that allows the PR branches out-of-the-box 2023-03-29 15:53:29 +01:00
David Baker 4bf1fbfd8e Gah, the sentry logger 2023-03-29 13:31:47 +01:00
David Baker 34a72679a1 Merge remote-tracking branch 'origin/main' into dbkr/otel 2023-03-29 12:30:41 +01:00
David Baker 77c6357b08 Use js-sdk from hangup refactor branch
https://github.com/matrix-org/matrix-js-sdk/pull/3234
2023-03-29 12:28:04 +01:00
David Baker 15e4c01c5d Add max old space fix to publish workflow too v0.3.6 2023-03-28 15:47:59 +01:00
David Baker 1307d89175 Merge pull request #975 from vector-im/dbkr/update_js_sdk_20230328
Update js-sdk
2023-03-28 15:40:30 +01:00
David Baker d53be695f9 Work around Vite unbounded memory usage
Port fix from otel branch where it appears to be working
2023-03-28 15:33:11 +01:00
David Baker 247d15cbb5 Update js-sdk
for https://github.com/matrix-org/matrix-js-sdk/commit/da03c3b529576a8fcde6f2c9a171fa6cca012830
2023-03-28 15:24:33 +01:00
Robin Townsend c4f029ae4f Fix lint error 2023-03-27 22:30:12 -04:00
David Baker 40f5c53c05 Put CORS header back to http://* with comment on why browsers are annoying 2023-03-24 09:31:52 +00:00
Robin Townsend 5f41f9476b Disable the opt in analytics setting if Posthog isn't configured 2023-03-23 13:07:34 -04:00
David Baker d1ba5dff38 Allow all origins 2023-03-23 14:37:25 +00:00
Robin 71b1d0c6b1 Merge pull request #970 from robintown/matrix-widget-api
Update matrix-widget-api
2023-03-22 13:58:36 -04:00
Robin Townsend 76c0277301 Update matrix-js-sdk 2023-03-22 11:41:41 -04:00
Robin Townsend 698bea93e3 Update matrix-widget-api 2023-03-22 11:33:50 -04:00
David Baker 48493a96e1 Wait until config is loaded to load otel 2023-03-22 12:41:33 +00:00
David Baker ec88907981 Comment the max old space workaround which seems to be working (so far) 2023-03-22 12:04:15 +00:00
David Baker 9c0adfd32e Unused import 2023-03-22 12:00:34 +00:00
David Baker f6fb65be49 Remove odd source mapping comment & unused commented code 2023-03-22 11:58:41 +00:00
David Baker 3d6ae3fbc3 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.
2023-03-22 11:55:21 +00:00
David Baker 359e055314 Make callMembershipSpan optional 2023-03-21 12:13:51 +00:00
David Baker 6696af9b3f Experiment to try & stop vite OOMing 2023-03-20 19:29:19 +00:00
David Baker 9b02d17224 Merge branch 'main' into dbkr/otel 2023-03-20 19:20:13 +00:00
David Baker 6b36604c84 Update js-sdk 2023-03-20 19:17:50 +00:00
David Baker ef9934ce6b Commit nginx config file 2023-03-20 13:53:07 +00:00
David Baker e7a7cf3eb8 Export events to posthog too 2023-03-20 13:30:21 +00:00
David Baker 63ede0b51a Version using events for call joins / leaves and matrix events
This is probably conceptually nicer although isn't quite as nice in
the jaeger / stalk UI.

Also this may no loger work with the posthog exporter (unsure what it
will do with events on spans).
2023-03-17 19:26:23 +00:00
David Baker 2d91b43a7d Set attributes on the root span
Setting them on the context doesn't actually make them show up in
jaeger, it's just a way to propagate the info around between
different things.
2023-03-17 19:03:43 +00:00
Robin ff90e507a6 Merge pull request #963 from alariej/navigator_mediasession_fix
Fix for Android WebView, which does not support navigator.mediaSession
2023-03-17 13:20:05 -04:00
David Baker f8f5d2011d Add CORS to jaeger query endpoint and make spans nested
Adds an nginx in front of the query endpoint so we can use stalk
without faffing with browser extension to bypass CORS.

Also make the spans correctly have the call membership span as parent,
which they didn't because we hadn't set the span at the point we made
the context.
2023-03-17 17:01:59 +00:00
alariej 1bf1813a77 Fix for Android WebView, which does not support navigator.mediaSession 2023-03-17 17:20:16 +01:00
David Baker 521b0a857a Send spans for state events 2023-03-16 18:08:28 +00:00