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

feat: meta_struct support #184

Merged
merged 7 commits into from
Aug 14, 2024
Merged

feat: meta_struct support #184

merged 7 commits into from
Aug 14, 2024

Conversation

eliottness
Copy link
Contributor

Description

This PR adds support for a specific field supported since agent version v7.31 called meta_struct which encapsulate another layer of msgpack values inside the main msgpack chunk.

Motivation

Appsec has been using this field to store stacktraces for multiple quarters already. We need to be able to test this feature

Notes to reviewer

Not overly happy about this implementation but there is not obvious way to do a first round of type checking, modify the span object, and then do a second round of type-checking. So I've simply put everything in the verify_span function.

eliottness and others added 4 commits August 8, 2024 15:45
Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
@eliottness eliottness force-pushed the eliottness/delete-meta-struct branch from 567af52 to d5035d1 Compare August 13, 2024 14:26
Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
@eliottness eliottness force-pushed the eliottness/delete-meta-struct branch from d5035d1 to 53ef913 Compare August 13, 2024 14:30
@eliottness
Copy link
Contributor Author

It seems that the CI is broken with the following error: /home/runner/work/_temp/b3e3d4aa-56a4-4bf2-8c9c-7f47ec8f3b93.sh: line 2: rst2html.py: command not found

@eliottness eliottness marked this pull request as ready for review August 13, 2024 14:31
@Kyle-Verhoog
Copy link
Member

ah yes ignore that error, there's some weird dependency issue that broke in the changelog job!

Copy link
Member

@Kyle-Verhoog Kyle-Verhoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one suggestion for where the mutation logic should be, otherwise looks good to me!

ddapm_test_agent/trace.py Outdated Show resolved Hide resolved
Copy link

@RomainMuller RomainMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (modulo the same concern that @Kyle-Verhoog expressed in his review)

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
ddapm_test_agent/trace.py Show resolved Hide resolved
ddapm_test_agent/trace.py Show resolved Hide resolved
ddapm_test_agent/trace.py Show resolved Hide resolved
Copy link
Member

@Kyle-Verhoog Kyle-Verhoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one non-blocking thought. Great work. Thank you for the tests and release note 🚢

ddapm_test_agent/trace.py Show resolved Hide resolved
@eliottness eliottness merged commit 68f3552 into master Aug 14, 2024
11 checks passed
@eliottness eliottness deleted the eliottness/delete-meta-struct branch August 14, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants