Add OperationID in client request header#1390
Add OperationID in client request header#1390chiengyn wants to merge 1 commit intooapi-codegen:mainfrom
Conversation
|
Almost file changes are the result when I ran |
|
Hey @chrisngyn thanks for raising this. Unfortunately this isn't something that we'd like to make the default. You may be able to do this with a If you were to tweak this and make it an opt-in flag (see #1404 for where we've added an opt-in flag) then that'd be great. |
|
Thank you for contributing, and I'm very sorry for taking so long to get to this PR. At this point, the code has changed so much that it's no longer relevant because the maintainer suggested an opt-in flag approach and the redesign was never followed up on. The code has changed significantly since then. |
I utilized this library to create a client from an OpenAPI specification, and now I aim to develop an interceptor for monitoring outgoing HTTP requests using Prometheus.
However, the request path varies based on path parameters, making it impractical to use it as a label value for Prometheus metrics.
As a solution, I propose adding an additional header (
Operation-Id) to each HTTP request. This adjustment simplifies the process of writing the monitoring interceptor.It just a naive solution. Feel free to suggest me the better solutions.