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 config support for "on_error" in Elasticsearch tracing #4066

Merged

Conversation

bill-kolokithas
Copy link
Contributor

@bill-kolokithas bill-kolokithas commented Nov 5, 2024

This mirrors the functionality that is already present in many other instrumenters.

Reasons for wanting this:

One might want to ignore some errors in some expected scenarios such as

Elasticsearch::Transport::Transport::Errors::NotFound
or
Elasticsearch::Transport::Transport::Errors::Conflict

What does this PR do?
Adds on_error configuration support for Elasticsearch tracing and forwards it to Tracing.trace

Motivation:
We have flows where NotFound exceptions are expected and we make sure to handle them in the application.
We don't want them to show up as errors in the dashboard though.

Change log entry
Yes. Add configuration option on_error to Elasticsearch tracing

(Added by @Strech)

How to test the change?
Run provided tests with bundle exec rake test:elasticsearch

@bill-kolokithas bill-kolokithas requested review from a team as code owners November 5, 2024 10:55
@github-actions github-actions bot added integrations Involves tracing integrations tracing labels Nov 5, 2024
This mirrors the functionality that is already present in many other
instrumenters.

Reasons for wanting this:

You might want to ignore some errors in some expected scenarios such as

Elasticsearch::Transport::Transport::Errors::NotFound
or
Elasticsearch::Transport::Transport::Errors::Conflict
@bill-kolokithas bill-kolokithas force-pushed the elasticsearch_on_error_support branch from 9398422 to 4e02912 Compare November 5, 2024 12:47
@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.78%. Comparing base (77b9d8f) to head (72bdaad).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4066      +/-   ##
==========================================
+ Coverage   97.77%   97.78%   +0.01%     
==========================================
  Files        1353     1353              
  Lines       81785    81806      +21     
  Branches     4141     4143       +2     
==========================================
+ Hits        79963    79997      +34     
+ Misses       1822     1809      -13     

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

Copy link

@rtrieu rtrieu left a comment

Choose a reason for hiding this comment

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

Minor feedback on tense.

docs/GettingStarted.md Outdated Show resolved Hide resolved
@ivoanjo ivoanjo requested a review from a team November 6, 2024 15:38
@marcotc marcotc added this to the 2.8.0 milestone Nov 25, 2024
Copy link
Member

@Strech Strech left a comment

Choose a reason for hiding this comment

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

Well done 👏🏼

I've updated PR body and add Change log entry section

@TonyCTHsu TonyCTHsu merged commit ce4393e into DataDog:master Nov 26, 2024
290 checks passed
@ivoanjo ivoanjo mentioned this pull request Dec 10, 2024
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.

7 participants