-
Notifications
You must be signed in to change notification settings - Fork 9
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] Gate compilation using cargo features #541
Conversation
74f236f
to
08aa381
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #541 +/- ##
==========================================
- Coverage 70.45% 70.45% -0.01%
==========================================
Files 208 213 +5
Lines 28414 28408 -6
==========================================
- Hits 20020 20014 -6
Misses 8394 8394
|
BenchmarksThis comment was omitted because it was over 65536 characters.Please check the Gitlab Job logs to see its output. |
Looks like this also needs changes to ffi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM--pretty reasonable-looking refactor with minimal changes to how the code operates.
@@ -1,12 +1,13 @@ | |||
// Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silly question: do these copyright notices indicate the year of first existence for the noted file, or the last update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume first year of existence. At Amazon we stopped using years, and went to a SPDX header which was much cleaner
What does this PR do?
Adds two new cargo features:
collector
andreceiver
. Refactors the code to make it easy to use thosecfg
to define what gets built at compile time.Motivation
The current implementation of the library always builds in all code. This is not great, because it bloats binary size etc. We have users who
CrashInfo
objects, which they upload. They have no need or use for thereceiver
orcollector
portions of this codeCrashInfo
object and send it on. They need all parts of the code.CrashInfo
object and send it on. The first binary needs thecollector
but not thereceiver
; the sidecar needs the opposite.Additional Notes
Currently, we don't have support when building the ffi library for feature selection. This is a first step towards making that worthwhile.
I did some refactoring as I moved code around, but there is still more refactoring that could be done.
How to test the change?
This is a refactor, existing tests cover the functionality
PROF-10245