feat: support disablement of APM Tracing (the product)#224
Merged
Conversation
33c8913 to
c65356d
Compare
ba4291a to
2b1e5a8
Compare
2b1e5a8 to
55684de
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #224 +/- ##
==========================================
+ Coverage 86.45% 86.51% +0.05%
==========================================
Files 80 82 +2
Lines 5251 5346 +95
==========================================
+ Hits 4540 4625 +85
- Misses 711 721 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cataphract
approved these changes
Jul 21, 2025
Comment on lines
+8
to
+19
| bool validate_trace_source(StringView source_str) { | ||
| if (source_str.size() > 2) return false; | ||
|
|
||
| auto maybe_ts_uint = parse_uint64(source_str, 10); | ||
| if (maybe_ts_uint.if_error()) return false; | ||
|
|
||
| // Bit twiddling magic is coming from | ||
| // <http://www.graphics.stanford.edu/~seander/bithacks.html> <3. | ||
| auto is_power_of_2 = [](uint64_t v) -> bool { return v && !(v & (v - 1)); }; | ||
|
|
||
| return is_power_of_2(*maybe_ts_uint); | ||
| } |
Contributor
There was a problem hiding this comment.
You document that it is a bitmap, but then require that only one flag be set (that it is a power of two).
Collaborator
Author
There was a problem hiding this comment.
Good catch, thank you. Fixed in ff2c7ea
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Supersede #217
Motivation
While the original approach worked, I identified a more straightforward way to reach the same goals with fewer moving parts and a clearer mental model.
Some behaviors, especially around context extraction, aren’t fully defined in the RFC yet. Rather than making assumptions, we took the opportunity to clarify and solidify these behaviors.
Reusing existing constructs and patterns makes the codebase easier to understand, test, and evolve. This rework brings the implementation closer to that goal.
Improvements (non-exhaustive)