DataDog / dd-trace-dotnet

.NET Client Library for Datadog APM
https://docs.datadoghq.com/tracing/
Apache License 2.0
456 stars 142 forks source link

Protect the connection string tags extractor from an invalid connection string #5956

Closed tonyredondo closed 2 months ago

tonyredondo commented 2 months ago

Summary of changes

This PR fixes an scenario when the connection string could not be parsed by avoiding the exception.

Reason for change

Seen in Error tracking:

image

Implementation details

Wrap the method in a try catch block, and return default on that invalid connection string. The caller method already returns default in other cases.

Test coverage

This is an small fix, I didn't write a test case for this... yet.

Other details

datadog-ddstaging[bot] commented 2 months ago

Datadog Report

Branch report: tony/fix-connectionstring-cache-issue Commit report: 76f8db9 Test service: dd-trace-dotnet

:white_check_mark: 0 Failed, 300951 Passed, 1584 Skipped, 11h 51m 59.76s Total Time

andrewlock commented 2 months ago

Execution-Time Benchmarks Report :stopwatch:

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:

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