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

feat: extend performance API with explicit timings #1093

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JoshuaMoelans
Copy link
Member

@JoshuaMoelans JoshuaMoelans commented Nov 28, 2024

Fixes #941

  • add tests for new API functions
  • add changelog entry
  • update docs (?)

Copy link

github-actions bot commented Nov 28, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 54067f0

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.46%. Comparing base (99b1539) to head (54067f0).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1093      +/-   ##
==========================================
+ Coverage   82.40%   82.46%   +0.05%     
==========================================
  Files          53       53              
  Lines        7760     7806      +46     
  Branches     1215     1215              
==========================================
+ Hits         6395     6437      +42     
- Misses       1254     1258       +4     
  Partials      111      111              

event_id = sentry_transaction_finish(tx);
TEST_CHECK(!sentry_uuid_is_nil(&event_id));
if (timestamped) {
sentry_uuid_t event_id = sentry_transaction_finish_ts(tx, 4);
Copy link
Member Author

Choose a reason for hiding this comment

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

Since the transaction gets destroyed at this point, I'm not sure if there is a unit-test way to check if the timestamp got set correctly. Would we need an integration test for this?

@@ -378,7 +378,7 @@ sentry__value_span_new_n(size_t max_spans, sentry_value_t parent,
sentry_value_new_string_n(description.ptr, description.len));
sentry_value_set_by_key(child, "start_timestamp",
sentry__value_new_string_owned(
sentry__usec_time_to_iso8601(sentry__usec_time())));
sentry__usec_time_to_iso8601(timestamp)));
Copy link
Member Author

Choose a reason for hiding this comment

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

Should our API's in-code docs mention what kind of timestamp we 'expect' (e.g. a value relative to the epoch time)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, and also that the unit of time is microseconds.

@JoshuaMoelans JoshuaMoelans marked this pull request as ready for review November 29, 2024 10:18
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.

Feature Request: Provide explicit timings to the Performance Monitoring API
2 participants