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

Can't listen error info by RequestListener in Instrumenter lifecycle end #3730

Closed
zmapleshine opened this issue Jul 30, 2021 · 1 comment · Fixed by #3988
Closed

Can't listen error info by RequestListener in Instrumenter lifecycle end #3730

zmapleshine opened this issue Jul 30, 2021 · 1 comment · Fixed by #3988
Labels
enhancement New feature or request

Comments

@zmapleshine
Copy link
Contributor

zmapleshine commented Jul 30, 2021

Is your feature request related to a problem? Please describe.
I am trying to add "hasError” tag to my custom component metrics by RequestListener, but this interface has no way to transfer Throwable info to its implementation class.

At first I wanted to pass exceptions by RESPONSE, and I needed to modify the generics of the instrument class but I thought it was important to make a distinction.

/** Listener method that is called at the end of a request. */
  void end(Context context, Attributes responseAttributes);

Describe the solution you'd like

add throwable param to "end" method in interface RequestListener.

Describe alternatives you've considered

None

Additional context

None

@zmapleshine zmapleshine added the enhancement New feature or request label Jul 30, 2021
@zmapleshine
Copy link
Contributor Author

zmapleshine commented Jul 30, 2021

Maybe RequestListener interface is better called "InstrumentListener"?
And it should both pass Attributes to implementation class and support passing REQUEST/RESPONSE directly, because the data format in Attributes may not meet the requirements and needs to be resolved from the REQUEST/RESPONSE object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants