Closed PERSEJOZA closed 3 months ago
Fabric Smart Client already provides this option, see https://github.com/hyperledger-labs/fabric-smart-client/blob/main/docs/monitoring.md. If you use Token SDK, you could not override it anymore because the sdk already did that (and dig does not allow the same dependency to be overridden twice). It will be fixed with https://github.com/hyperledger-labs/fabric-token-sdk/pull/725.
The library has a support for OpenTelemetry by providing some configuration parameters. However, we noticed that the trace provider defined in the library overwrites the trace provider defined in the microservice, resulting in inconsistent spans with different microservice names. Moreover, if there are multiple exporters defined, span information is shared via several channels, which is inefficient and eliminates the benefits of a configurable exporter.
It would be nice if the library could provide a way to keep an existing trace provider if it is already defined or just let the microservice that uses it to configure tracing. This would allow for more flexibility and better integration with other tracing solutions.