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

Live debugger parsing, expression evaluation, sender, redaction and FFI #497

Merged
merged 38 commits into from
Oct 2, 2024

Conversation

bwoebi
Copy link
Contributor

@bwoebi bwoebi commented Jun 19, 2024

Parsing goes through an intermediate step, which serde can simply deserialize to, handling which isn't possible by serde is then translated to working structures.

The Evaluator (feel free to clean up lifetime handling if possible. Spent far too much time fighting the borrow checker. Maybe my code is already perfect and I don't know it.) handles all evaluation of the expression language, iteration, error handling etc. and defers to some callbacks for actual evaluation of the values.

@bwoebi bwoebi requested review from a team as code owners June 19, 2024 23:09
@bwoebi bwoebi force-pushed the bob/remote-config branch 3 times, most recently from b89fdee to 95c7998 Compare June 25, 2024 16:11
@bwoebi bwoebi force-pushed the bob/live-debugger branch 3 times, most recently from 8ed0173 to dd7c3c4 Compare June 26, 2024 14:44
@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 50.94062% with 1669 lines in your changes missing coverage. Please review.

Project coverage is 71.87%. Comparing base (43c5a39) to head (27146ae).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #497      +/-   ##
==========================================
- Coverage   73.83%   71.87%   -1.97%     
==========================================
  Files         257      271      +14     
  Lines       37329    40654    +3325     
==========================================
+ Hits        27563    29221    +1658     
- Misses       9766    11433    +1667     
Components Coverage Δ
crashtracker 20.36% <ø> (-0.06%) ⬇️
crashtracker-ffi 9.07% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 92.71% <ø> (-0.63%) ⬇️
data-pipeline-ffi 0.00% <ø> (ø)
ddcommon 82.73% <55.55%> (-0.35%) ⬇️
ddcommon-ffi 69.12% <52.94%> (-0.40%) ⬇️
ddtelemetry 59.10% <ø> (ø)
ddtelemetry-ffi 22.13% <ø> (ø)
dogstatsd 90.42% <ø> (ø)
dogstatsd-client 79.77% <ø> (ø)
ipc 82.69% <39.44%> (-0.90%) ⬇️
profiling 84.26% <ø> (ø)
profiling-ffi 77.42% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 36.35% <21.62%> (-1.85%) ⬇️
sidecar-ffi 0.00% <0.00%> (ø)
spawn-worker 50.36% <ø> (ø)
tinybytes 94.77% <ø> (ø)
trace-mini-agent 72.47% <ø> (ø)
trace-normalization 98.25% <ø> (ø)
trace-obfuscation 95.73% <ø> (ø)
trace-protobuf 77.67% <ø> (ø)
trace-utils 93.46% <ø> (ø)

@bwoebi bwoebi changed the title Live debugger parsing, expression evaluation, sender and FFI Live debugger parsing, expression evaluation, sender, redaction and FFI Jun 29, 2024
live-debugger-ffi/src/data.rs Show resolved Hide resolved
Probe {
id: from.id.as_str().into(),
version: from.version,
language: from.language.as_ref().map(|s| s.as_str().into()).into(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a note/explanation somewhere for what this is for? Are there multiple string types being used?

Copy link
Contributor Author

@bwoebi bwoebi Jul 1, 2024

Choose a reason for hiding this comment

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

Not sure what you are asking? Why I'm collecting the language? What this particular line of rust does? Or just asking what I'm doing to convert an Option<String> into an Option<CharSlice>?

Copy link
Contributor

Choose a reason for hiding this comment

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

Apologies for being unclear. I was asking why language: from.language would be insufficient, for my general education on how rust works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yeah, just the conversion of the value within the Option to something FFI understands.

live-debugger-ffi/src/sender.rs Outdated Show resolved Hide resolved
live-debugger/src/redacted_names.rs Show resolved Hide resolved
live-debugger/src/sender.rs Outdated Show resolved Hide resolved
@bwoebi bwoebi force-pushed the bob/live-debugger branch 7 times, most recently from 1af5976 to 2e750e5 Compare July 5, 2024 00:26
@bwoebi bwoebi requested a review from a team as a code owner July 8, 2024 15:42
@bwoebi bwoebi force-pushed the bob/remote-config branch 4 times, most recently from 2ca32a8 to 9375778 Compare July 8, 2024 16:42
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Otherwise concurrency in tests will lead to flakiness.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
@bwoebi bwoebi merged commit b8a7d2d into main Oct 2, 2024
30 checks passed
@bwoebi bwoebi deleted the bob/live-debugger branch October 2, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants