Content-Length: 332466 | pFad | http://github.com/electric-sql/electric/pull/2837

F0 feat(sync-service): GenStage telemetry by robacourt · Pull Request #2837 · electric-sql/electric · GitHub
Skip to content

feat(sync-service): GenStage telemetry #2837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

robacourt
Copy link
Contributor

Current replication processing time telemetry records overall time and breaks down by it's various parts, however there are gaps in this breakdown and data from trigger.dev shows that a significant amount of time is spent in these gaps.

This PR times all the following 7 intervals (in this order):

  1. message_to_collector
  2. new_txn_handle_call
  3. gen_stage_receive_txn
  4. partitions.handle_event
  5. dispatcher.dispatch
  6. gen_stage.post_dispatch
  7. message_from_collector

3 of these intervals were already available: message_to_collector, partitions.handle_event and dispatcher.dispatch however are now using the new IntervalTimer for consistency.

The new IntervalTimer (and it's sibling ProcessIntervalTimer) have been introduced as many of these intervals are impossible to put spans around due to way GenStage code is structured. ProcessIntervalTimer additionally uses process memory for the times when the timer state cannot be passed around (again due to how GenStage code is structured)

@robacourt robacourt marked this pull request as ready for review June 17, 2025 15:55
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

Attention: Patch coverage is 97.72727% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.24%. Comparing base (0a99fa4) to head (326bf82).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...c-service/lib/electric/telemetry/interval_timer.ex 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2837      +/-   ##
==========================================
- Coverage   78.32%   78.24%   -0.08%     
==========================================
  Files         155      156       +1     
  Lines        7354     7379      +25     
  Branches      275      273       -2     
==========================================
+ Hits         5760     5774      +14     
- Misses       1592     1603      +11     
  Partials        2        2              
Flag Coverage Δ
elixir 77.14% <97.72%> (-0.14%) ⬇️
elixir-client 73.57% <ø> (ø)
packages/experimental 88.95% <ø> (+1.22%) ⬆️
packages/react-hooks 86.30% <ø> (ø)
packages/typescript-client 92.41% <ø> (+0.15%) ⬆️
packages/y-electric 55.12% <ø> (ø)
postgres-140000 77.20% <97.72%> (-0.12%) ⬇️
postgres-150000 77.26% <97.72%> (+0.08%) ⬆️
postgres-170000 77.33% <97.72%> (+0.12%) ⬆️
sync-service 77.62% <97.72%> (-0.16%) ⬇️
typescript 84.54% <ø> (+0.27%) ⬆️
unit-tests 78.24% <97.72%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@robacourt
Copy link
Contributor Author

benchmark this

Copy link
Contributor

github-actions bot commented Jun 17, 2025

Benchmark results, triggered for 2d633

  • write fanout completed

write fanout results

  • unrelated shapes one client latency completed

unrelated shapes one client latency results

  • many shapes one client latency completed

many shapes one client latency results

  • diverse shape fanout completed

diverse shape fanout results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/electric-sql/electric/pull/2837

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy