org.hyperledger.fabric.metrics.package-info Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fabric-chaincode-shim Show documentation
Show all versions of fabric-chaincode-shim Show documentation
Hyperledger Fabric Java Chaincode Shim
/*
* Copyright 2019 IBM All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Provides interfaces and classes to support collection of metrics.
*
*
* The main metrics that are available are the statistics around the number of
* tasks that are running, and how the thread pool is handling these.
*
*
* Note a 'task' is a message from the Peer to the Chaincode - this message is
* either a new transaction, or a response from a stub API, eg getState(). Query
* apis may return more than one response.
*
*
* To enable metrics, add a CHAINCODE_METRICS_ENABLED=true
setting
* to the config.props
chaincode configuration file.
* See the Overview for details of how to
* configure chaincode.
*
*
Open Telemetry
*
* To use Open Telemetry, set the following properties:
*
*
* CHAINCODE_METRICS_ENABLED=true
* CHAINCODE_METRICS_PROVIDER=org.hyperledger.fabric.metrics.impl.OpenTelemetryMetricsProvider
*
*
* Additionally, 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
*
*/
package org.hyperledger.fabric.metrics;