netifi-proteus / proteus-java

Proteus Java Client
https://www.netifi.com
Apache License 2.0
43 stars 3 forks source link

Make it possible to exclude metrics & tracing when generating stubs #10

Open bsideup opened 6 years ago

bsideup commented 6 years ago

Hi!

Currently, the generated code contains code for the metrics & tracing, even if it's optional. Would be great to have an option to disable them at the code generation phase.

Thanks!

bsideup commented 6 years ago

Hi @robertroeser!

Anything I can help with?

Currently, we can't even use compileOnly and have to put OpenTracing & MicroMeter on the classpath because of Optional<> parameters in the constructor (JVM will fail if classes are missing)

robertroeser commented 6 years ago

Hi @bsideup

If you want to take a crack making OpenTracing and Micrometer options in protoc that would be cool.
Changes would have to be made here to the protoc plugin https://github.com/netifi-proteus/proteus-java/tree/develop/protobuf-rpc/src/java_plugin/cpp

and then figure out how to send parameters to protoc to disable open tracing and micrometer