Skip to content
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

internal: appsec: switch appsec event tag from json to messagepack using meta_struct #2570

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

eliottness
Copy link
Contributor

@eliottness eliottness commented Feb 21, 2024

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 eliott.bouhana@datadoghq.com

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
APPSEC-51698

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Feb 21, 2024
@pr-commenter
Copy link

pr-commenter bot commented Feb 22, 2024

Benchmarks

Benchmark execution time: 2024-02-23 13:36:44

Comparing candidate commit 147955e in PR branch eliott.bouhana/APPSEC-51880 with baseline commit c8613ca in branch eliott.bouhana/APPSEC-51697.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 40 metrics, 1 unstable metrics.

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
…ing meta_struct

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
…[]any but it supports map[string]any :[

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
… in meta_struct

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
Copy link

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.

@github-actions github-actions bot added the stale Stuck for more than 1 month label Mar 15, 2024
@eliottness eliottness removed the stale Stuck for more than 1 month label Mar 15, 2024
Copy link

github-actions bot commented Apr 5, 2024

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.

@github-actions github-actions bot added the stale Stuck for more than 1 month label Apr 5, 2024
@eliottness eliottness force-pushed the eliott.bouhana/APPSEC-51697 branch 7 times, most recently from c3350e9 to 3b9f898 Compare April 17, 2024 13:49
Base automatically changed from eliott.bouhana/APPSEC-51697 to main April 17, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs stale Stuck for more than 1 month
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant