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

[crashtracker] Move FFI to its own crate #551

Merged
merged 32 commits into from
Aug 1, 2024
Merged

Conversation

danielsn
Copy link
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
crashtracker-ffi/Cargo.toml Outdated Show resolved Hide resolved
@pr-commenter
Copy link

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.

examples/ffi/crashinfo.cpp Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

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
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 :)

crashtracker-ffi/Cargo.toml Outdated Show resolved Hide resolved
crashtracker-ffi/Cargo.toml Outdated Show resolved Hide resolved
crashtracker-ffi/src/collector/counters.rs Outdated Show resolved Hide resolved
crashtracker-ffi/src/collector/mod.rs Outdated Show resolved Hide resolved
crashtracker-ffi/src/collector/mod.rs Outdated Show resolved Hide resolved
crashtracker-ffi/src/collector/spans.rs Outdated Show resolved Hide resolved
examples/ffi/crashinfo.cpp Outdated Show resolved Hide resolved
examples/ffi/crashinfo.cpp Outdated Show resolved Hide resolved
examples/ffi/crashinfo.cpp Outdated Show resolved Hide resolved
crashtracker-ffi/cbindgen.toml Show resolved Hide resolved
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
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!

crashtracker-ffi/Cargo.toml Outdated Show resolved Hide resolved
crashtracker-ffi/src/datatypes/mod.rs Show resolved Hide resolved
crashtracker-ffi/src/demangler/mod.rs Outdated Show resolved Hide resolved
crashtracker-ffi/src/crash_info/mod.rs Show resolved Hide resolved
ddcommon-ffi/src/timespec.rs Outdated Show resolved Hide resolved
ddcommon-ffi/src/option.rs Show resolved Hide resolved
Co-authored-by: Ivo Anjo <ivo.anjo@datadoghq.com>
@danielsn danielsn merged commit 9895dd2 into main Aug 1, 2024
32 checks passed
@danielsn danielsn deleted the dsn/crashtrack-own-ffi branch August 1, 2024 17:04
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