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

Add on_error settings for mysql2 #3316

Merged
merged 4 commits into from
Dec 19, 2023
Merged

Conversation

TonyCTHsu
Copy link
Contributor

@TonyCTHsu TonyCTHsu commented Dec 11, 2023

What does this PR do?

Add on_error settings for mysql2 instrumentation.

Motivation:

This proc provides the flexibility to handle exception that does not want to be reported.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

@github-actions github-actions bot added integrations Involves tracing integrations tracing labels Dec 11, 2023
@TonyCTHsu TonyCTHsu marked this pull request as ready for review December 11, 2023 13:25
@TonyCTHsu TonyCTHsu requested review from a team as code owners December 11, 2023 13:25
@TonyCTHsu TonyCTHsu self-assigned this Dec 11, 2023
@TonyCTHsu TonyCTHsu added this to the 1.19.0 milestone Dec 11, 2023
docs/GettingStarted.md Outdated Show resolved Hide resolved
Copy link
Contributor

@alai97 alai97 left a comment

Choose a reason for hiding this comment

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

Looks good, two suggestions!

docs/GettingStarted.md Outdated Show resolved Hide resolved
TonyCTHsu and others added 3 commits December 12, 2023 14:38
Co-authored-by: Austin Lai <76412946+alai97@users.noreply.github.com>
Co-authored-by: Edmund Kump <edmund.kump@datadoghq.com>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0fa4a67) 98.23% compared to head (863c9ec) 98.23%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3316      +/-   ##
==========================================
- Coverage   98.23%   98.23%   -0.01%     
==========================================
  Files        1253     1253              
  Lines       72766    72781      +15     
  Branches     3417     3417              
==========================================
+ Hits        71481    71495      +14     
- Misses       1285     1286       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TonyCTHsu TonyCTHsu merged commit e6c48b0 into master Dec 19, 2023
218 checks passed
@TonyCTHsu TonyCTHsu deleted the tonycthsu/mysql2-on-error branch December 19, 2023 15:57
@alekgosk
Copy link

alekgosk commented Jan 2, 2024

Wow, this is amazing @TonyCTHsu, thank you! This is exactly what we are looking for!

Question: do you think this is something we can also implement for the grape integration?

We have this issue currently where we catch all exceptions using rescue :all, yet they still appear in DataDog's Error Tracking which creates unnecessary noise, we described it here = #3253

@TonyCTHsu
Copy link
Contributor Author

👋 @alekgosk , We are preparing our 2.0 release, which would include this PR #3370, which might help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrations Involves tracing integrations tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MySQL duplicate key being reported as an error, even though it's expected
6 participants