apm-agent-java icon indicating copy to clipboard operation
apm-agent-java copied to clipboard

Support for setting the remote address of a transaction via the public api

Open tobiasstadler opened this issue 3 years ago • 10 comments

What does this PR do?

Adds support for setting the remote address of a transaction via the public api

Checklist

  • [x] This is an enhancement of existing features, or a new feature in existing plugins
    • [x] I have updated CHANGELOG.asciidoc
    • [ ] I have added tests that prove my fix is effective or that my feature works
    • [x] Added an API method or config option? Document in which version this will be introduced
    • [x] I have made corresponding changes to the documentation

tobiasstadler avatar Mar 17 '22 11:03 tobiasstadler

👋 @tobiasstadler 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.

github-actions[bot] avatar Mar 17 '22 11:03 github-actions[bot]

:grey_exclamation: Build Aborted

The PR is not allowed to run in the CI yet

the below badges are clickable and redirect to their specific view in the CI or DOCS Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Start Time: 2022-10-05T09:39:30.323+0000

  • Duration: 3 min 27 sec

Steps errors 2

Expand to view the steps failures

Load a resource file from a library
  • Took 0 min 0 sec . View more details here
  • Description: approval-list/elastic/apm-agent-java.yml
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/tobiasstadler return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/tobiasstadler : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/tobiasstadler : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user"}

:robot: GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run benchmark tests : Run the benchmark tests.

  • run jdk compatibility tests : Run the JDK Compatibility tests.

  • run integration tests : Run the Agent Integration tests.

  • run end-to-end tests : Run the APM-ITs.

  • run windows tests : Build & tests on windows.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

apmmachine avatar Mar 17 '22 11:03 apmmachine

ping

tobiasstadler avatar Apr 11 '22 09:04 tobiasstadler

ping

tobiasstadler avatar May 04 '22 06:05 tobiasstadler

ping

tobiasstadler avatar May 31 '22 08:05 tobiasstadler

ping

tobiasstadler avatar Jun 29 '22 07:06 tobiasstadler

Hi @tobiasstadler, could you give a little detail on why this feature addition is useful? We're more focused on enhancing our support of OpenTelemetry so that eventually that provides the API for the agent, but we can add to the existing API if it's useful and simple

jackshirazi avatar Jul 11 '22 10:07 jackshirazi

I would like to record the "client ip" in my ejb plugin (https://github.com/tobiasstadler/apm-wildfly-remote-ejb-plugin). From time time I have the need to filter my transactions based on the service (which in our case is mostly identical with the client ip) that is calling my service. right now this is hard to accomplish reliably fro me.

tobiasstadler avatar Jul 12 '22 13:07 tobiasstadler

Thanks. Couple of things.

We think that if the transaction api is used to set the remote address, then that should take precedence over any discovered address - even if the transaction sets it to null or empty string. I think atm the final value would just be down to the order of setting

Secondly, could you add a test?

jackshirazi avatar Jul 19 '22 14:07 jackshirazi

Hi! We just realized that we haven't looked into this issue in a while. We're sorry! We're labeling this issue as stalled to make it hit our filters and make sure we get back to it in as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

botelastic[bot] avatar Sep 25 '22 04:09 botelastic[bot]

Hi! We just realized that we haven't looked into this issue in a while. We're sorry! We're labeling this issue as stalled to make it hit our filters and make sure we get back to it in as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

botelastic[bot] avatar Dec 04 '22 10:12 botelastic[bot]

Hi! This issue has been stale for a while and we're going to close it as part of our cleanup procedure. We appreciate your contribution and would like to apologize if we have not been able to review it, due to the current heavy load of the team. Feel free to re-open this issue if you think it should stay open. Thank you for your contribution!

botelastic[bot] avatar Dec 18 '22 10:12 botelastic[bot]