Protect the connection string tags extractor from an invalid connection string#5956
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 300951 Passed, 1584 Skipped, 11h 51m 59.76s Total Time |
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:
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). |
Co-authored-by: Andrew Lock <[email protected]>
…on string (#5956) ## 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: <img width="1127" alt="image" src="https://github.com/user-attachments/assets/436de8fe-b6b8-43d7-a894-5554bb4e04eb"> ## 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 <!-- Fixes #{issue} --> <!--⚠️ Note: where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. --> --------- Co-authored-by: Andrew Lock <[email protected]>
…on string (#5956 -> v2) (#5960) ## 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: <img width="1127" alt="image" src="https://github.com/user-attachments/assets/436de8fe-b6b8-43d7-a894-5554bb4e04eb"> ## 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 Backport of #5956 Co-authored-by: Andrew Lock <[email protected]>
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:
Implementation details
Wrap the method in a try catch block, and return default on that invalid connection string.
The caller method already returns
defaultin other cases.Test coverage
This is an small fix, I didn't write a test case for this... yet.
Other details