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

Add meta_struct support on traces and spans #4334

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vpellan
Copy link
Contributor

@vpellan vpellan commented Jan 31, 2025

What does this PR do?

This PR adds meta_struct support to traces and spans. meta_struct is a way to send complex structures to the backend. It is sent as a Map<String, ByteArray> with the ByteArray being the structure encoded in messagepack.

Motivation:

meta_struct is required for stack trace collection, which is required for exploit prevention. But this can also be used by other products.

Change log entry

None.

Additional Notes:

How to test the change?

@github-actions github-actions bot added appsec Application Security monitoring product tracing labels Jan 31, 2025
@vpellan vpellan force-pushed the vpellan/meta-struct branch from b9e8d5d to b3dc5c2 Compare January 31, 2025 12:39
@vpellan vpellan force-pushed the vpellan/meta-struct branch from b3dc5c2 to 0836e11 Compare January 31, 2025 12:48
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Jan 31, 2025

Datadog Report

Branch report: vpellan/meta-struct
Commit report: 0836e11
Test service: dd-trace-rb

✅ 0 Failed, 22101 Passed, 1476 Skipped, 5m 15.08s Total Time

@vpellan vpellan removed the appsec Application Security monitoring product label Jan 31, 2025
@pr-commenter
Copy link

pr-commenter bot commented Jan 31, 2025

Benchmarks

Benchmark execution time: 2025-01-31 13:12:18

Comparing candidate commit 0836e11 in PR branch vpellan/meta-struct with baseline commit cefebdf in branch master.

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

scenario:profiler - stack collector

  • 🟥 throughput [-163.173op/s; -160.907op/s] or [-5.615%; -5.537%]

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 88.23529% with 4 lines in your changes missing coverage. Please review.

Project coverage is 97.71%. Comparing base (cefebdf) to head (0836e11).
Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
lib/datadog/tracing/span_operation.rb 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4334      +/-   ##
==========================================
- Coverage   97.72%   97.71%   -0.02%     
==========================================
  Files        1368     1369       +1     
  Lines       82998    83027      +29     
  Branches     4220     4222       +2     
==========================================
+ Hits        81108    81126      +18     
- Misses       1890     1901      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants