Package org.hyperledger.fabric.traces
Supports collection of traces
This creates traces at the root level of chaincode calls. To enable traces ensure that there is a standard format Java properties file called `config.props` in the root of your contract code. For example this path
myjava - contract - project / java / src / main / resources / config.propsThis should contain the following
CHAINCODE_TRACES_ENABLED=trueThe traces enabled flag will turn on default traces logging. (it's off by default). If no file is supplied traces are not enabled, the values shown for the thread pool are used.
Open Telemetry
To use Open Telemetry, set the following properties:CHAINCODE_TRACES_ENABLED=true CHAINCODE_TRACES_PROVIDER=org.hyperledger.fabric.traces.impl.OpenTelemetryTracesProviderAdditionally, you can set properties after the specification: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/sdk-environment-variables.md Example:
OTEL_EXPORTER_OTLP_ENDPOINT=otelcollector:4317 OTEL_EXPORTER_OTLP_INSECURE=true
-
Interface Summary Interface Description TracesProvider Interface to be implemented to send traces on the chaincode to the 'backend-of-choice'. -
Class Summary Class Description Traces Traces Interface.