dd-trace-go
dd-trace-go copied to clipboard
internal: appsec: switch appsec event tag from json to messagepack using meta_struct
What does this PR do?
This PR optimize the was appsec events are sent to the backend by using the new meta_struct span field to sent structured data to the backend without resorting to json in a string.
Motivation
Marshaling json values directly in the customer hot path adds overhead to ASM that can now be avoided using this method that moves serializing to the agent writer goroutine.
Reviewer's Checklist
- [ ] Changed code has unit tests for its functionality at or near 100% coverage.
- [ ] System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
- [ ] There is a benchmark for any new code, or changes to existing code.
- [ ] If this interacts with the agent in a new way, a system test has been added.
- [ ] Add an appropriate team label so this PR gets put in the right place for the release notes.
- [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
For Datadog employees:
- [ ] If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from
@DataDog/security-design-and-guidance. - [ ] This PR doesn't touch any of that.
Unsure? Have a question? Request a review! APPSEC-51698
Signed-off-by: Eliott Bouhana [email protected]
Benchmarks
Benchmark execution time: 2024-02-23 13:36:44
Comparing candidate commit 147955e7f66a9eaffec872fdc02374ecf9acfaa8 in PR branch eliott.bouhana/APPSEC-51880 with baseline commit c8613caadcd8def3930a5cff74483d4dfb52873d in branch eliott.bouhana/APPSEC-51697.
Found 0 performance improvements and 0 performance regressions! Performance is the same for 40 metrics, 1 unstable metrics.
This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.