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

Set transaction type only if unset #3226

Merged
merged 7 commits into from Aug 16, 2023

Conversation

kelunik
Copy link
Contributor

@kelunik kelunik commented Jul 10, 2023

What does this PR do?

This PR avoids overwriting a custom transaction type if set by the application.

Currently, changing the transaction type in an application has no effect, because it is changed by ServletTransactionHelper again.

Separating transaction types is necessary if you want to separate main requests from internal RPC requests for example.

Checklist

  • This is an enhancement of existing features, or a new feature in existing plugins
    • I have updated CHANGELOG.asciidoc
    • I have added tests that prove my fix is effective or that my feature works
    • Added an API method or config option? Document in which version this will be introduced
    • I have made corresponding changes to the documentation
  • This is a bugfix
  • This is a new plugin
    • I have updated CHANGELOG.asciidoc
    • My code follows the style guidelines of this project
    • I have made corresponding changes to the documentation
    • I have added tests that prove my fix is effective or that my feature works
    • New and existing unit tests pass locally with my changes
    • I have updated supported-technologies.asciidoc
    • Added an API method or config option? Document in which version this will be introduced
    • Added an instrumentation plugin? Describe how you made sure that old, non-supported versions are not instrumented by accident.
  • This is something else

Currently, changing the transaction type in an application has no effect, because it is changed here again.

Separating transaction types is necessary if you want to separate main requests from internal RPC requests for example.
@cla-checker-service
Copy link

cla-checker-service bot commented Jul 10, 2023

💚 CLA has been signed

@github-actions github-actions bot added agent-java community Issues and PRs created by the community triage labels Jul 10, 2023
@github-actions
Copy link

👋 @kelunik Thanks a lot for your contribution!

It may take some time before we review a PR, so even if you don’t see activity for some time, it does not mean that we have forgotten about it.

Every once in a while we go through a process of prioritization, after which we are focussing on the tasks that were planned for the upcoming milestone. The prioritization status is typically reflected through the PR labels. It could be pending triage, a candidate for a future milestone, or have a target milestone set to it.

Copy link
Contributor

@JonasKunz JonasKunz left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!
It indeed does make sense to allow overriding the transaction type.
I've added a testcase proving your fix works as desired and added a changelog for you.

Could you please sign the CLA so that we can merge this PR?

@JonasKunz JonasKunz removed the triage label Jul 27, 2023
@kelunik
Copy link
Contributor Author

kelunik commented Jul 27, 2023

Hey @JonasKunz,

Thanks for the review and test! I have the CLA on my list, unfortunately it needs to go through legal before I can submit it.

@JonasKunz
Copy link
Contributor

run elasticsearch-ci/docs

@JonasKunz
Copy link
Contributor

run elasticsearch-ci/docs

@JonasKunz JonasKunz merged commit d32b5de into elastic:main Aug 16, 2023
13 checks passed
@JonasKunz
Copy link
Contributor

Thanks for your contribution @kelunik !

Copy link
Contributor

@jackshirazi jackshirazi left a comment

Choose a reason for hiding this comment

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

approved

@kelunik
Copy link
Contributor Author

kelunik commented Aug 16, 2023

@JonasKunz Thank you for the tests and handling with the CLA!

@kelunik kelunik deleted the servlet-transaction-type branch August 16, 2023 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-java community Issues and PRs created by the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants