Forum Discussion

okumoto's avatar
okumoto
New Contributor
4 years ago

Automatic generation of tracing (opentelemetry)

Hi,

Is there a way to add additional tracing to the client and server sub functions?  I have several services that use hand written marshaling/demarshaling libraries.  I want to swagger to generate them instead.  But in addition, I want to add code to trace when those APIs are used.

 

For example, if I had a hello wold service I want both the client and the server to emit traces each time the Hello API was used.

1 Reply

  • okumoto's avatar
    okumoto
    New Contributor

    I'm still looking into this, but it looks like adding code to the mustache templates would be a way to add the logging.  From a git pull of @swagger-codegen I found the templates used to generate the code.

     

    swagger-codegen/modules/swagger-codegen/src/main/resources/python