-
Notifications
You must be signed in to change notification settings - Fork 182
feat(FeatureFlags): FFE APM feature-flag span enrichment (experimental, gated) #3996
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
Open
leoromanovsky
wants to merge
32
commits into
master
Choose a base branch
from
leo.romanovsky/ffe-apm-span-enrichment
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
053f9d8
feat(02-05): thread split serial_id Rust -> C -> PHP mapper + add spa…
leoromanovsky 8027165
feat(02-05): inline span-enrichment accumulation (DG-004) + codec + r…
leoromanovsky cf47e8e
fix(02-05): reset FFE span-enrichment accumulator on root-span bounda…
leoromanovsky e5fa42f
test(ffe): add await_ffe_config internal fn to pump RC in CLI servers
leoromanovsky 102d3be
feat(FeatureFlags): bind APM span enrichment to native Client path
leoromanovsky 2cf4062
fix(config): regenerate supported-configurations.json for span-enrich…
leoromanovsky 50c80d5
test(ffe): use PHP 7.0-compatible int assertion in ResultMapperTest
leoromanovsky 5477477
fix(ffe): add non-creating root accessor + gate await_ffe_config test…
leoromanovsky f0a0351
fix(ffe): share one request-scoped span-enrichment accumulator across…
leoromanovsky 5a037d1
test(ffe): cover shared-accumulator aggregation, gate-off inertness, …
leoromanovsky 3229c80
fix(ffe): emit ffe_* JSON as raw UTF-8 with unescaped slashes (Node p…
leoromanovsky 156726d
Fix PHP span enrichment CI compatibility
leoromanovsky 30ff2d3
Merge branch 'master' into leo.romanovsky/ffe-apm-span-enrichment
pavlokhrebto 89686f3
Merge branch 'master' of github.com:DataDog/dd-trace-php into leo.rom…
pavlokhrebto 265422f
fix(ffe): fix span-enrichment tag leak, truncation, and reset-order b…
pavlokhrebto fcda2fa
fix(ffe): align root-drop test with proven refcount shape so it hits …
pavlokhrebto 82ffc6a
Fix
pavlokhrebto 92f1b6f
fix(ffe): skip staging without a root, use span_id for root identity,…
pavlokhrebto bedfcde
fix(ffe): drop redundant require_once in Client and correct misleadin…
pavlokhrebto b6dddb9
Merge branch 'master' into leo.romanovsky/ffe-apm-span-enrichment
pavlokhrebto f3a7178
Merge branch 'master' into leo.romanovsky/ffe-apm-span-enrichment
pavlokhrebto 8096369
fix(config): bump ZAI_CONFIG_ENTRIES_COUNT_MAX to 320
pavlokhrebto fea9fd5
fix(ffe): narrow FfeResult.serial_id from i64 to i32
pavlokhrebto e2468b7
refactor(ffe): attach span enrichment to root span via ObjectKVStore
pavlokhrebto dd06af9
refactor(ffe): remove native span-enrichment staging layer
pavlokhrebto 1738ca1
test(ffe): cover span-enrichment recording against real root spans
pavlokhrebto 2b92832
docs(ffe): refresh span-enrichment comments for the ObjectKVStore design
pavlokhrebto 2cb81e1
test(ffe): fix span-enrichment .phpt for pecl + concurrent roots
pavlokhrebto 8e240c0
Merge branch 'master' into leo.romanovsky/ffe-apm-span-enrichment
pavlokhrebto 92f0115
refactor(ffe): address review — typed args, dirty-guarded tag writes,…
pavlokhrebto c1e430a
Merge branch 'leo.romanovsky/ffe-apm-span-enrichment' of github.com:D…
pavlokhrebto bf321e6
test(ffe): run span-enrichment .phpt under the PHPUnit featureflags s…
pavlokhrebto 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 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,6 +97,14 @@ pub struct FfeResult { | |
| pub allocation_key: MaybeOwnedZendString, | ||
| pub reason: i32, | ||
| pub error_code: i32, | ||
| // serial_id is the selected split's serial id, carried for APM span | ||
| // enrichment (ffe_flags_enc). The source field is Option<i32>; since the | ||
| // C ABI cannot represent Option<i32> as a plain field, we surface the | ||
| // presence separately via has_serial_id. Consumers MUST gate on | ||
| // has_serial_id (the Pattern B "missing variant => default" semantic) and | ||
| // never treat serial_id == 0 as "absent". | ||
|
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. 👍 |
||
| pub serial_id: i32, | ||
| pub has_serial_id: bool, | ||
| pub do_log: bool, | ||
| pub valid: bool, | ||
| } | ||
|
|
@@ -220,6 +228,8 @@ fn result_from_assignment(assignment: Result<ffe::Assignment, EvaluationError>) | |
| AssignmentReason::Default => REASON_DEFAULT, | ||
| }, | ||
| error_code: ERROR_NONE, | ||
| serial_id: assignment.serial_id.unwrap_or(0), | ||
| has_serial_id: assignment.serial_id.is_some(), | ||
| do_log: assignment.do_log, | ||
| valid: true, | ||
| } | ||
|
|
@@ -244,6 +254,8 @@ fn result_from_assignment(assignment: Result<ffe::Assignment, EvaluationError>) | |
| allocation_key: None, | ||
| reason, | ||
| error_code, | ||
| serial_id: 0, | ||
| has_serial_id: false, | ||
| do_log: false, | ||
| valid: true, | ||
| } | ||
|
|
@@ -258,6 +270,8 @@ fn invalid_result() -> FfeResult { | |
| allocation_key: None, | ||
| reason: REASON_ERROR, | ||
| error_code: ERROR_GENERAL, | ||
| serial_id: 0, | ||
| has_serial_id: false, | ||
| do_log: false, | ||
| valid: false, | ||
| } | ||
|
|
||
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
had no idea the i32 would have such knock-on complications. :(