-
-
Notifications
You must be signed in to change notification settings - Fork 178
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: Add internal UUID types #616
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4803e6d
feat: Add support for internal UUIDs
relaxolotl 7573ece
convenience make target to run unit tests
relaxolotl 5657473
minor doc fixes
relaxolotl 078e1cd
follow existing naming conventions
relaxolotl 7517fb2
hail mary
relaxolotl 82cc53b
forgot to update byte counts
relaxolotl a758967
document new helper
relaxolotl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,6 +1,7 @@ | ||||||
#include "sentry_boot.h" | ||||||
|
||||||
#include "sentry_random.h" | ||||||
#include "sentry_uuid.h" | ||||||
#include <stdio.h> | ||||||
#include <string.h> | ||||||
|
||||||
|
@@ -101,6 +102,27 @@ sentry_uuid_as_string(const sentry_uuid_t *uuid, char str[37]) | |||||
#undef B | ||||||
} | ||||||
|
||||||
void | ||||||
internal_sentry_uuid_as_string(const sentry_uuid_t *uuid, char str[37]) | ||||||
{ | ||||||
#define B(X) (unsigned char)uuid->bytes[X] | ||||||
snprintf(str, 37, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Since you are only serializing 16 hex bytes, and a zero byte. |
||||||
"%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%" | ||||||
"02hhx%02hhx%02hhx%02hhx%02hhx%02hhx", | ||||||
B(0), B(1), B(2), B(3), B(4), B(5), B(6), B(7), B(8), B(9), B(10), | ||||||
B(11), B(12), B(13), B(14), B(15)); | ||||||
#undef B | ||||||
} | ||||||
|
||||||
void | ||||||
sentry_span_uuid_as_string(const sentry_uuid_t *uuid, char str[17]) | ||||||
{ | ||||||
#define B(X) (unsigned char)uuid->bytes[X] | ||||||
snprintf(str, 17, "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx", B(0), | ||||||
B(1), B(2), B(3), B(4), B(5), B(6), B(7)); | ||||||
#undef B | ||||||
} | ||||||
|
||||||
#ifdef SENTRY_PLATFORM_WINDOWS | ||||||
sentry_uuid_t | ||||||
sentry__uuid_from_native(const GUID *guid) | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on my machine this still spits out an absurd number of errors that look vaguely like
i've tried negative grepping and awking this away to no luck; i would imagine in the worst case scenario this would require some sort of custom build that changes the logging level on crashpad to error at minimum. any help here would be much appreciated as the unit test results are unnecessarily difficult to parse through by default thanks to my poor shell skills.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can ignore this. Just
rm -rf .sentry-native
, as that directory is safe to prune.However now I think that we might want to have a solution for this, as I bet customers are hitting that as well sometimes and its not as simple to tell them "just remove that directory".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll leave this as is for the time being. if a contributor ends up bumping into this problem we can loop back and look into addressing this then. the solutions i've explored so far to deal with this are all fairly ugly, so i'd rather take the hit and just manually prune the reports stored in my local DB.