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

[CrashTracking] Let libdatadog set the endpoint #5666

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

kevingosse
Copy link
Collaborator

@kevingosse kevingosse commented Jun 7, 2024

Summary of changes

Libdatadog v10 knows how to extract the agent endpoint from the environment variable, so remove the placeholder logic.

Reason for change

It was just a temporary solution.

Implementation details

Test coverage

Added a test to make sure that libdatadog pushes telemetry to the right endpoint.

@kevingosse kevingosse requested a review from a team as a code owner June 7, 2024 13:47
@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Jun 7, 2024
Copy link
Collaborator

@gleocadie gleocadie left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@chrisnas chrisnas left a comment

Choose a reason for hiding this comment

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

LGTM

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Jun 7, 2024

Datadog Report

Branch report: kevin/crash_endpoint
Commit report: daf7291
Test service: dd-trace-dotnet

✅ 0 Failed, 343867 Passed, 1962 Skipped, 14h 55m 25.7s Total Time

@andrewlock
Copy link
Member

andrewlock commented Jun 7, 2024

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5666) - mean (74ms)  : 63, 85
     .   : milestone, 74,
    master - mean (73ms)  : 65, 81
     .   : milestone, 73,

    section CallTarget+Inlining+NGEN
    This PR (5666) - mean (976ms)  : 955, 997
     .   : milestone, 976,
    master - mean (974ms)  : 958, 990
     .   : milestone, 974,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5666) - mean (108ms)  : 105, 112
     .   : milestone, 108,
    master - mean (108ms)  : 105, 111
     .   : milestone, 108,

    section CallTarget+Inlining+NGEN
    This PR (5666) - mean (684ms)  : 661, 706
     .   : milestone, 684,
    master - mean (687ms)  : 673, 701
     .   : milestone, 687,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5666) - mean (93ms)  : 89, 96
     .   : milestone, 93,
    master - mean (92ms)  : 89, 96
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (5666) - mean (645ms)  : 620, 669
     .   : milestone, 645,
    master - mean (645ms)  : 620, 671
     .   : milestone, 645,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5666) - mean (192ms)  : 188, 196
     .   : milestone, 192,
    master - mean (193ms)  : 189, 198
     .   : milestone, 193,

    section CallTarget+Inlining+NGEN
    This PR (5666) - mean (1,078ms)  : 1050, 1106
     .   : milestone, 1078,
    master - mean (1,071ms)  : 1050, 1091
     .   : milestone, 1071,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5666) - mean (277ms)  : 270, 283
     .   : milestone, 277,
    master - mean (278ms)  : 272, 283
     .   : milestone, 278,

    section CallTarget+Inlining+NGEN
    This PR (5666) - mean (861ms)  : 834, 887
     .   : milestone, 861,
    master - mean (858ms)  : 833, 883
     .   : milestone, 858,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5666) - mean (267ms)  : 262, 273
     .   : milestone, 267,
    master - mean (267ms)  : 262, 272
     .   : milestone, 267,

    section CallTarget+Inlining+NGEN
    This PR (5666) - mean (849ms)  : 824, 875
     .   : milestone, 849,
    master - mean (847ms)  : 822, 873
     .   : milestone, 847,

Loading

@kevingosse kevingosse requested a review from a team as a code owner June 7, 2024 14:39
var data = agent.WaitForLatestTelemetry(d => d.IsRequestType(TelemetryRequestTypes.RedactedErrorLogs));
data.Should().NotBeNull();

var log = (LogsPayload)data.Payload;
Copy link
Member

Choose a reason for hiding this comment

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

Just FYI, this is a bit neater in general

data.TryGetPayload(TelemetryRequestTypes.RedactedErrorLogs)

Comment on lines +342 to +343
log.Logs.Should().HaveCount(1);
var report = JObject.Parse(log.Logs[0].Message);
Copy link
Member

Choose a reason for hiding this comment

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

Just FYI, You can also do something like this:

var singleLog = log.Logs.Should().ContainSingle().Subject;
var report = JObject.Parse(singleLog);

@kevingosse kevingosse merged commit 2545a4b into master Jun 7, 2024
60 of 65 checks passed
@kevingosse kevingosse deleted the kevin/crash_endpoint branch June 7, 2024 16:46
@github-actions github-actions bot added this to the vNext-v2 milestone Jun 7, 2024
@andrewlock andrewlock added area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) and removed area:profiler Issues related to the continous-profiler labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:crashtracking area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants