Skip to content
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

editoast: add telemetry on database requests #7389

Merged
merged 3 commits into from
May 15, 2024

Conversation

woshilapin
Copy link
Contributor

@woshilapin woshilapin commented May 7, 2024

The second commit tries to add identifiers in metadata of the traces. However, it seems that it would be not trivial to do it without the valuable feature... which is unstable.

⚠️ Weirdly, the build with Docker seems to ignore the configuration .cargo/config.toml (hence the build is failing). Needs some investigation if we want to go that path.

@woshilapin woshilapin requested a review from leovalais May 7, 2024 23:06
@codecov-commenter
Copy link

codecov-commenter commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.49%. Comparing base (f88f40d) to head (ff1e7dd).
Report is 5 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##                dev    #7389       +/-   ##
=============================================
+ Coverage     29.44%   87.49%   +58.04%     
=============================================
  Files          1162       31     -1131     
  Lines        143499     1535   -141964     
  Branches       2808        0     -2808     
=============================================
- Hits          42253     1343    -40910     
+ Misses        99588      192    -99396     
+ Partials       1658        0     -1658     
Flag Coverage Δ
core ?
editoast ?
front ?
gateway ?
railjson_generator 87.49% <ø> (ø)
tests ?

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.

@leovalais
Copy link
Contributor

Nice! I'm not against using the unstable feature as even if that becomes a problem, reverting that single commit wouldn't be much work and won't degrade the service. But I'm wondering whether we should be using Valuable at all as Debug seems to be fine (albeit less readable). And even if we were to parse the span metadata with some script in the future, we can always deserialize it as RON.

Maybe model-X would be a better span name than database-X (an object may require several model operations to be considered "retrieved" from the database, eg. scenarios that also fetch their study and project).

Now that List and Count are merged they also need to be annotated ;)

@woshilapin woshilapin force-pushed the wsl/feat/editoast-db-telemetry branch from 0d23a19 to 3b61898 Compare May 14, 2024 16:28
@woshilapin woshilapin marked this pull request as ready for review May 14, 2024 16:28
@woshilapin woshilapin requested a review from a team as a code owner May 14, 2024 16:28
@woshilapin
Copy link
Contributor Author

I removed the unstable feature and went Debug everywhere. Looks much better now.

@woshilapin woshilapin force-pushed the wsl/feat/editoast-db-telemetry branch 2 times, most recently from 87bad14 to b60829f Compare May 15, 2024 10:14
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! (tested + reviewed)

Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Since @flomonster already tested it I'll just play with it later ;)

editoast/.cargo/config.toml Outdated Show resolved Hide resolved
editoast/editoast_derive/src/modelv2/codegen/count_impl.rs Outdated Show resolved Hide resolved
editoast/src/modelsv2/mod.rs Show resolved Hide resolved
@woshilapin woshilapin force-pushed the wsl/feat/editoast-db-telemetry branch from b60829f to ff1e7dd Compare May 15, 2024 15:33
@woshilapin woshilapin enabled auto-merge May 15, 2024 15:34
@woshilapin woshilapin added this pull request to the merge queue May 15, 2024
Merged via the queue into dev with commit 8294d84 May 15, 2024
17 checks passed
@woshilapin woshilapin deleted the wsl/feat/editoast-db-telemetry branch May 15, 2024 16:11
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.

4 participants