Skip to content

[crashtracker] Move FFI to its own crate#551

Merged
danielsn merged 32 commits intomainfrom
dsn/crashtrack-own-ffi
Aug 1, 2024
Merged

[crashtracker] Move FFI to its own crate#551
danielsn merged 32 commits intomainfrom
dsn/crashtrack-own-ffi

Conversation

@danielsn
Copy link
Copy Markdown
Contributor

@danielsn danielsn commented Jul 26, 2024

What does this PR do?

Moves the crashtracker FFI to its own crate, seperate from Profiling.

Motivation

Consumers want to use crashtracking without profiling. This is a step in this direction.

Additional Notes

  1. Building and shipping the crashtracking only part of the library is future work
  2. As part of this refactor, I renamed a bunch of symbols which had unneeded prefixes.

How to test the change?

Run the existing test suite, plus the FFI examples

PROF-10245

@danielsn danielsn requested review from a team as code owners July 26, 2024 21:12
@github-actions github-actions Bot added profiling Relates to the profiling* modules. ci-build common labels Jul 26, 2024
Comment thread crashtracker-ffi/Cargo.toml Outdated
@danielsn danielsn force-pushed the dsn/crashtrack-own-ffi branch from 827d908 to 0411e84 Compare July 26, 2024 21:21
@github-actions github-actions Bot removed the common label Jul 26, 2024
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Jul 26, 2024

Benchmarks

This comment was omitted because it was over 65536 characters.Please check the Gitlab Job logs to see its output.

Comment thread examples/ffi/crashinfo.cpp Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 29, 2024

Codecov Report

Attention: Patch coverage is 6.83761% with 109 lines in your changes missing coverage. Please review.

Project coverage is 70.45%. Comparing base (19b758c) to head (4cc2207).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #551      +/-   ##
==========================================
+ Coverage   70.44%   70.45%   +0.01%     
==========================================
  Files         213      213              
  Lines       28455    28448       -7     
==========================================
  Hits        20044    20044              
+ Misses       8411     8404       -7     
Components Coverage Δ
crashtracker 21.17% <5.74%> (-4.04%) ⬇️
datadog-alloc 98.73% <ø> (ø)
data-pipeline 50.00% <ø> (ø)
data-pipeline-ffi 0.00% <ø> (ø)
ddcommon 84.97% <10.00%> (-1.27%) ⬇️
ddcommon-ffi 70.28% <10.00%> (-4.30%) ⬇️
ddtelemetry 58.95% <ø> (ø)
ipc 84.18% <ø> (ø)
profiling 84.26% <ø> (+6.16%) ⬆️
profiling-ffi 77.42% <ø> (+20.65%) ⬆️
serverless 0.00% <ø> (ø)
sidecar 35.42% <ø> (ø)
sidecar-ffi 0.00% <ø> (ø)
spawn-worker 54.98% <ø> (ø)
trace-mini-agent 70.88% <ø> (ø)
trace-normalization 98.24% <ø> (ø)
trace-obfuscation 95.73% <ø> (ø)
trace-protobuf 77.16% <ø> (ø)
trace-utils 90.90% <ø> (ø)

Copy link
Copy Markdown
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

So since we're moving things around, I did a deeper-dive review with a big focus on the APIs.

Since a lot of my comments are around names and consolidating stuff, I hope you don't take it as too much of a bikeshed. If it sounds like that at times, sorry in advance! 🙏

Do feel free to push back on any comments you don't agree with and don't feel blocked by them :)

Comment thread crashtracker-ffi/Cargo.toml Outdated
Comment thread crashtracker-ffi/Cargo.toml Outdated
Comment thread crashtracker-ffi/src/collector/counters.rs Outdated
Comment thread crashtracker-ffi/src/collector/mod.rs Outdated
Comment thread crashtracker-ffi/src/collector/mod.rs Outdated
Comment thread crashtracker-ffi/src/collector/spans.rs
Comment thread examples/ffi/crashinfo.cpp Outdated
Comment thread examples/ffi/crashinfo.cpp Outdated
Comment thread examples/ffi/crashinfo.cpp
Comment thread crashtracker-ffi/cbindgen.toml
danielsn and others added 4 commits July 31, 2024 14:28
Co-authored-by: Ivo Anjo <ivo.anjo@datadoghq.com>
…or Azure Functions, Google Cloud Functions, and Azure Spring Apps (#548)

* add _dd.mini_agent_version to spans in all environments

* apply formatting
* add azure spring app environment type for serverless mini agent

* add config.statsd_port to mini agent info endpoint

* update mini agent trace endpoint status code and response body to work with java tracer

* use different environment variable to identify azure spring apps

* only update http response for success responses to traces endpoint

* address lint errors

* updates comment and formatting

* update trace-mini-agent description to include Azure Spring Apps

* fix formatting
@danielsn danielsn requested review from a team as code owners July 31, 2024 18:29
Copy link
Copy Markdown
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

👍 LGTM, thanks for addressing my comments so thoroughly!

Comment thread crashtracker-ffi/Cargo.toml Outdated
Comment thread crashtracker-ffi/src/datatypes/mod.rs
Comment thread crashtracker-ffi/src/demangler/mod.rs
Comment thread crashtracker-ffi/src/crash_info/mod.rs
Comment thread ddcommon-ffi/src/timespec.rs
Comment thread ddcommon-ffi/src/option.rs
Co-authored-by: Ivo Anjo <ivo.anjo@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-build common profiling Relates to the profiling* modules.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants