Skip to content

H-5024: Use ServiceBuilder to connect Sentry layers #7669

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

Merged

Conversation

TimDiekmann
Copy link
Member

🌟 What is the purpose of this PR?

There seems to be an issue around axum layers and Sentry if the layers are simply added to. This changes the implementation to use ServiceBuilder instead.

@TimDiekmann TimDiekmann self-assigned this Jul 21, 2025
@TimDiekmann TimDiekmann requested a review from CiaranMn July 21, 2025 11:23
@TimDiekmann TimDiekmann enabled auto-merge July 21, 2025 11:23
@github-actions github-actions bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/tests New or updated tests area/tests > integration New or updated integration tests labels Jul 21, 2025
@TimDiekmann TimDiekmann force-pushed the t/h-5024-use-servicebuilder-to-connect-sentry-layers branch from a4873b1 to 8b1ca8d Compare July 21, 2025 11:23
@github-actions github-actions bot removed area/tests New or updated tests area/tests > integration New or updated integration tests labels Jul 21, 2025
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 55.21%. Comparing base (1b4e903) to head (8b1ca8d).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
libs/@local/graph/api/src/rest/mod.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7669      +/-   ##
==========================================
- Coverage   55.22%   55.21%   -0.01%     
==========================================
  Files        1082     1082              
  Lines       94786    94788       +2     
  Branches     4510     4510              
==========================================
  Hits        52341    52341              
- Misses      41461    41463       +2     
  Partials      984      984              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.32% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
local.hash-backend-utils 3.69% <ø> (ø)
local.hash-graph-sdk 0.00% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.hash-graph-api 4.20% <0.00%> (-0.01%) ⬇️

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TimDiekmann TimDiekmann added this pull request to the merge queue Jul 21, 2025
Merged via the queue into main with commit b037960 Jul 21, 2025
71 checks passed
@TimDiekmann TimDiekmann deleted the t/h-5024-use-servicebuilder-to-connect-sentry-layers branch July 21, 2025 11:59
Copy link
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$30.0 \mathrm{ms} \pm 296 \mathrm{μs}\left({\color{gray}3.49 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$30.5 \mathrm{ms} \pm 249 \mathrm{μs}\left({\color{red}7.90 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$30.2 \mathrm{ms} \pm 308 \mathrm{μs}\left({\color{red}8.42 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$30.6 \mathrm{ms} \pm 270 \mathrm{μs}\left({\color{red}9.74 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$31.1 \mathrm{ms} \pm 362 \mathrm{μs}\left({\color{red}5.82 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$34.3 \mathrm{ms} \pm 346 \mathrm{μs}\left({\color{red}19.2 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$30.1 \mathrm{ms} \pm 297 \mathrm{μs}\left({\color{gray}3.53 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$30.8 \mathrm{ms} \pm 258 \mathrm{μs}\left({\color{red}12.2 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$31.3 \mathrm{ms} \pm 326 \mathrm{μs}\left({\color{gray}-3.958 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_linkless

Function Value Mean Flame graphs
entity_by_id 10000 entities $$21.6 \mathrm{ms} \pm 141 \mathrm{μs}\left({\color{gray}3.61 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$15.6 \mathrm{ms} \pm 103 \mathrm{μs}\left({\color{red}12.3 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$14.6 \mathrm{ms} \pm 68.8 \mathrm{μs}\left({\color{gray}3.70 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$14.8 \mathrm{ms} \pm 74.6 \mathrm{μs}\left({\color{gray}2.69 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$13.9 \mathrm{ms} \pm 77.1 \mathrm{μs}\left({\color{lightgreen}-5.414 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_one_depth

Function Value Mean Flame graphs
entity_by_id 1 entities $$57.0 \mathrm{ms} \pm 313 \mathrm{μs}\left({\color{gray}3.56 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 50 entities $$5.35 \mathrm{s} \pm 597 \mathrm{ms}\left({\color{lightgreen}-5.862 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$105 \mathrm{ms} \pm 753 \mathrm{μs}\left({\color{gray}3.70 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$147 \mathrm{ms} \pm 1.10 \mathrm{ms}\left({\color{lightgreen}-43.170 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$69.5 \mathrm{ms} \pm 789 \mathrm{μs}\left({\color{red}8.60 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_zero_depth

Function Value Mean Flame graphs
entity_by_id 1 entities $$15.1 \mathrm{ms} \pm 124 \mathrm{μs}\left({\color{red}7.14 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 50 entities $$17.4 \mathrm{ms} \pm 93.8 \mathrm{μs}\left({\color{gray}-3.769 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$16.2 \mathrm{ms} \pm 135 \mathrm{μs}\left({\color{gray}4.40 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$17.0 \mathrm{ms} \pm 199 \mathrm{μs}\left({\color{gray}2.31 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$14.9 \mathrm{ms} \pm 129 \mathrm{μs}\left({\color{gray}3.33 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$9.87 \mathrm{ms} \pm 77.3 \mathrm{μs}\left({\color{red}14.6 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
link_by_source_by_property depths: DT=2, PT=2, ET=2, E=2 $$276 \mathrm{ms} \pm 3.76 \mathrm{ms}\left({\color{red}5.49 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=2 $$245 \mathrm{ms} \pm 1.44 \mathrm{ms}\left({\color{red}6.41 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=255, PT=255, ET=255, E=255 $$293 \mathrm{ms} \pm 2.50 \mathrm{ms}\left({\color{red}5.55 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=0 $$203 \mathrm{ms} \pm 1.95 \mathrm{ms}\left({\color{red}7.63 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=2, E=2 $$264 \mathrm{ms} \pm 2.52 \mathrm{ms}\left({\color{red}8.96 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=2, ET=2, E=2 $$265 \mathrm{ms} \pm 1.96 \mathrm{ms}\left({\color{red}5.35 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=2, PT=2, ET=2, E=2 $$140 \mathrm{ms} \pm 960 \mathrm{μs}\left({\color{red}8.80 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=2 $$125 \mathrm{ms} \pm 623 \mathrm{μs}\left({\color{red}18.6 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=255, PT=255, ET=255, E=255 $$163 \mathrm{ms} \pm 1.66 \mathrm{ms}\left({\color{red}7.90 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=0 $$116 \mathrm{ms} \pm 934 \mathrm{μs}\left({\color{red}18.0 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=2, E=2 $$137 \mathrm{ms} \pm 1.15 \mathrm{ms}\left({\color{red}21.5 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=2, ET=2, E=2 $$138 \mathrm{ms} \pm 933 \mathrm{μs}\left({\color{red}12.9 \mathrm{\%}}\right) $$ Flame Graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team
Development

Successfully merging this pull request may close these issues.

2 participants