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

contrib/labstack/echo.v4: add option to ignore errors #1567

Merged
merged 7 commits into from Jan 29, 2024

Conversation

mrkagelui
Copy link
Contributor

What does this PR do?

add option to ignore errors in tracing for echo framework

Motivation

I want to control which error should be tagged in spans and which should not

Describe how to test/QA your changes

unit tests should be able to cover this change

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Changed code has unit tests for its functionality.
  • If this interacts with the agent in a new way, a system test has been added.

@mrkagelui mrkagelui requested a review from a team November 6, 2022 14:00
@mrkagelui mrkagelui force-pushed the feat-echo-err-filter branch 2 times, most recently from 83b2e52 to f12ec40 Compare November 6, 2022 14:33
@mrkagelui
Copy link
Contributor Author

@gbbr sorry, I'm just tagging a random internal member. do you think I can get any review of this?

Copy link
Contributor

@katiehockman katiehockman left a comment

Choose a reason for hiding this comment

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

Hello! Would you please file an issue describing your precise use case so we know what problem you're running into?
Based on your issue, we'd like to hear whether or not #865 could meet your needs.

@mrkagelui
Copy link
Contributor Author

Hello! Would you please file an issue describing your precise use case so we know what problem you're running into? Based on your issue, we'd like to hear whether or not #865 could meet your needs.

Hi thanks for replying! primarily for me this is to control the status code going in error-tagged spans, but I think it's also useful in other areas such as controlling what types of custom errors should/shouldn't be tagged. also there doesn't seem to be much progress on that issue, I'd like this to be handled separately.

@dianashevchenko dianashevchenko added the proposal/accepted Accepted proposals label Dec 13, 2022
@ajgajg1134 ajgajg1134 added this to the v1.46.0 milestone Dec 13, 2022
@nsrip-dd nsrip-dd modified the milestones: v1.46.0, Triage Jan 3, 2023
@ahmed-mez ahmed-mez added the apm:ecosystem contrib/* related feature requests or bugs label Aug 17, 2023
Copy link
Contributor

@rarguelloF rarguelloF left a comment

Choose a reason for hiding this comment

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

@mrkagelui thanks for your PR! the feature looks good, just some minor nits to keep the option consistent with other contribs.

contrib/labstack/echo.v4/option.go Outdated Show resolved Hide resolved
contrib/labstack/echo.v4/option.go Outdated Show resolved Hide resolved
contrib/labstack/echo.v4/echotrace_test.go Outdated Show resolved Hide resolved
contrib/labstack/echo.v4/option.go Outdated Show resolved Hide resolved
@mrkagelui
Copy link
Contributor Author

@mrkagelui thanks for your PR! the feature looks good, just some minor nits to keep the option consistent with other contribs.

ok, will rebase and address these soon (in one or two day)

@mrkagelui mrkagelui force-pushed the feat-echo-err-filter branch 2 times, most recently from f680b57 to 585c43f Compare August 17, 2023 17:15
@mrkagelui
Copy link
Contributor Author

done @rarguelloF

@mrkagelui
Copy link
Contributor Author

By the way, if it's not for consistency reasons, I'd rather name it ignoreError, because it's clearer what the return of function means (ignore if true), errCheck is very ambiguous.

@mrkagelui
Copy link
Contributor Author

Be great if we can have some review/approval before it gets outdated again 😀 @rarguelloF

@mrkagelui
Copy link
Contributor Author

thanks for running and let me look into the failed tests

Copy link
Contributor

@rarguelloF rarguelloF left a comment

Choose a reason for hiding this comment

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

@mrkagelui thanks for addressing the comments from last review, it's looking good!

I found a small issue that I missed in the last review, please take a look at my comment and let me know what you think!

By the way, if it's not for consistency reasons, I'd rather name it ignoreError, because it's clearer what the return of function means (ignore if true), errCheck is very ambiguous.

I agree the name is probably improvable 😅 but in this case we prefer to give a consistent experience to the library users. Let's just make sure the public docs make it clear what the behaviour is (as you already did 🙂 ).

contrib/labstack/echo.v4/echotrace.go Outdated Show resolved Hide resolved
contrib/labstack/echo.v4/option.go Outdated Show resolved Hide resolved
@rarguelloF rarguelloF self-requested a review November 30, 2023 17:21
@rarguelloF
Copy link
Contributor

👋 @mrkagelui

For the sake of moving forward with the PR, I went ahead and I added the changes discussed in here: #1567 (comment)

It will be merged as soon as its reviewed and approved by someone from @DataDog/tracing-go

Thanks so much for your contribution and for your patience!

@mrkagelui mrkagelui requested a review from a team as a code owner January 29, 2024 21:31
@katiehockman katiehockman enabled auto-merge (squash) January 29, 2024 21:33
@katiehockman katiehockman merged commit d7ed3ea into DataDog:main Jan 29, 2024
100 checks passed
darccio added a commit that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs proposal/accepted Accepted proposals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants