You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now it's always ZnSimplifiedServerTransactionEvent. I'm implementing some metrics gathering on top of our APIs running on Zinc and I wanted to include one specific header in the simplified event.
By now we managed it by increasing the log level, but actually we don't need the full request and response, if we can provide a different kind of SimplifiedServerTransactionEvent we can just keep the information we need.
What do you think? If you want I can try to provide a PR providing this as an option.
The text was updated successfully, but these errors were encountered:
Injecting custom headers in a request or response, possibly in a processing pipeline (like a proxy), is a well established HTTP technique. What you did makes sense to me, I have done similar things.
This is then picked up automatically by ZnServerTransactionEvent, as it captures the full request and response objects. I think this is quite elegant.
The cost (memory/processing) is very acceptable since these objects already exist during processing, it is almost no extra work.
ZnSimplifiedServerTransactionEvent at level 1 was added as a precaution for possible performance problems (or benchmarking). It was simplified by design.
I can't immediately see how custom log event classes could solve your issue, since you can not access them directly when they are generated.
In summary: I think you did the right thing and there is no need for a change.
Right now it's always
ZnSimplifiedServerTransactionEvent
. I'm implementing some metrics gathering on top of our APIs running on Zinc and I wanted to include one specific header in the simplified event.By now we managed it by increasing the log level, but actually we don't need the full request and response, if we can provide a different kind of SimplifiedServerTransactionEvent we can just keep the information we need.
What do you think? If you want I can try to provide a PR providing this as an option.
The text was updated successfully, but these errors were encountered: