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

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

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 52.19136% with 1549 lines in your changes missing coverage. Please review.

Project coverage is 71.43%. Comparing base (40ca981) to head (18b45d6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #497      +/-   ##
==========================================
- Coverage   73.06%   71.43%   -1.63%     
==========================================
  Files         252      266      +14     
  Lines       35959    39099    +3140     
==========================================
+ Hits        26274    27931    +1657     
- Misses       9685    11168    +1483     
Components Coverage Δ
crashtracker 20.53% <ø> (+0.05%) ⬆️
datadog-alloc 98.73% <ø> (ø)
data-pipeline 90.12% <ø> (ø)
data-pipeline-ffi 0.00% <ø> (ø)
ddcommon 82.67% <33.33%> (-0.41%) ⬇️
ddcommon-ffi 68.80% <0.00%> (-0.72%) ⬇️
ddtelemetry 59.10% <ø> (ø)
ipc 82.92% <46.06%> (-0.71%) ⬇️
profiling 84.26% <ø> (+0.69%) ⬆️
profiling-ffi 77.42% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 38.00% <16.79%> (-2.13%) ⬇️
sidecar-ffi 0.00% <0.00%> (ø)
spawn-worker 50.36% <ø> (ø)
tinybytes 91.66% <ø> (ø)
trace-mini-agent 70.88% <ø> (ø)
trace-normalization 98.25% <ø> (ø)
trace-obfuscation 95.73% <ø> (ø)
trace-protobuf 77.67% <ø> (ø)
trace-utils 93.28% <ø> (+0.41%) ⬆️

@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
bwoebi and others added 24 commits September 19, 2024 19: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>
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 force-pushed the bob/live-debugger branch 2 times, most recently from 4de54ed to c55ff07 Compare September 20, 2024 10:55
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>
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