-
Notifications
You must be signed in to change notification settings - Fork 11
feat(context): all-native OTEL context write API — Phase 1 (PROF-15271) #631
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
Merged
Merged
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
fb5c4d2
docs(context): design note for all-native OTEL context storage
rkennke 7f7ee99
feat(context): all-native OTEL context write JNI primitives (PROF-15271)
rkennke c51fd66
feat(context): all-native public write API + global value cache (PROF…
rkennke 6424d55
refactor(context): deprecate the DirectByteBuffer context API (PROF-1…
rkennke a51c4f8
fix(context): native path self-initializes the LRS attrs_data entry (…
rkennke 106df58
test(context): all-native context write API tests (PROF-15271)
rkennke ef767b7
docs(context): reference the preserved benchmark-experiment branch (P…
rkennke c4e784f
test(context): production perf-guard benchmark for the all-native cyc…
rkennke cc3705e
docs(context): add missing javadoc tags on new all-native context API
rkennke ddc946a
review: address pre-review findings on the all-native context API
rkennke 7ee1b14
Merge branch 'main' into all-native-context-storage
rkennke aa4e7cb
Merge branch 'main' into all-native-context-storage
rkennke 95351e6
review: address PR #631 review findings on the all-native context API
rkennke a4b8ea4
Merge remote-tracking branch 'origin/main' into all-native-context-st…
rkennke a71cac9
review: address kaahos findings on the all-native context API
rkennke 6dd6efd
review: setContextValue0 preserves prior valid state (kaahos)
rkennke 9908c58
feat(context): fail fast on illegal arguments in the all-native write…
rkennke 5beb698
context: setContextValue0 publishes app context without a span
rkennke 019e0f5
context: native copyContextTags read + phase 2 migration plan
rkennke 0300aaf
context: add ContextSetter.size() (pure-Java slot count)
rkennke 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
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 |
|---|---|---|
|
|
@@ -21,6 +21,13 @@ | |
| import java.util.List; | ||
| import java.util.Set; | ||
|
|
||
| /** | ||
| * DirectByteBuffer context wrapper. | ||
| * | ||
| * @deprecated Superseded by {@link JavaProfiler#setTraceContext} / | ||
| * {@link JavaProfiler#setContextValue} (all-native). Removed in phase 3. | ||
| */ | ||
| @Deprecated | ||
| public class ContextSetter { | ||
|
|
||
| private final List<String> attributes; | ||
|
|
@@ -51,7 +58,7 @@ | |
| * copying to prevent stale data from leaking to the caller. | ||
| * Use the no-arg {@link #snapshotTags()} overload to obtain a correctly sized array. | ||
| */ | ||
| public void snapshotTags(int[] snapshot) { | ||
| if (snapshot.length >= attributes.size()) { | ||
| profiler.copyTags(snapshot); | ||
| Arrays.fill(snapshot, attributes.size(), snapshot.length, 0); | ||
|
|
@@ -85,7 +92,7 @@ | |
| * slots are zeroed in both the sidecar and attrs_data views. Callers must not assume the record | ||
| * is unmodified when {@code false} is returned. | ||
| */ | ||
| public boolean setContextValuesByIdAndBytes(int[] constantIds, byte[][] utf8) { | ||
|
Check warning on line 95 in ddprof-lib/src/main/java/com/datadoghq/profiler/ContextSetter.java
|
||
| return profiler.setContextAttributesByIdAndBytes(constantIds, utf8); | ||
| } | ||
|
|
||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.