metrics

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Namespace Organization namespace.
	Namespace = "vcs"

	// Crypto plain crypto operations.
	Crypto               = "crypto"
	CryptoSignTimeMetric = "crypto_sign_seconds"

	// Controller operations.
	Controller                    = "controller"
	ControllerCheckAuthRespMetric = "controller_checkAuthResponse_seconds"

	// Service operations.
	Service      = "service"
	VerifyOIDCVP = "service_verifyOIDCVerifiablePresentation_seconds"

	// HTTPServer HTTP server subsystem.
	HTTPServer = "httpserver"

	// HTTPClient HTTP client subsystem.
	HTTPClient                 = "httpclient"
	HTTPClientInFlightRequests = "in_flight_requests"
	HTTPClientTotalRequests    = "requests_total"
	HTTPClientRequestDuration  = "request_duration_seconds"
)

Constants used by different metrics provider.

Variables

View Source
var Logger = log.New("metrics-provider")

Logger used by different metrics provider.

Functions

This section is empty.

Types

type ClientID

type ClientID string

ClientID defines the ID of the client.

const (
	ClientPreAuth            ClientID = "preauthorize"
	ClientIssuerProfile      ClientID = "issuer-profile"
	ClientVerifierProfile    ClientID = "verifier-profile"
	ClientCredentialStatus   ClientID = "credential-status" //nolint:gosec
	ClientOIDC4CI            ClientID = "oidc4ci"
	ClientOIDC4CIV1          ClientID = "oidc4civ1"
	ClientOIDC4PV1           ClientID = "oidc4pv1"
	ClientWellKnown          ClientID = "wellknown"
	ClientIssuerInteraction  ClientID = "issuer-interaction"
	ClientCredentialVerifier ClientID = "credential-verifier" //nolint:gosec
)

type Metrics

type Metrics interface {
	SignTime(value time.Duration)
	CheckAuthorizationResponseTime(value time.Duration)
	VerifyOIDCVerifiablePresentationTime(value time.Duration)

	InstrumentHTTPTransport(ClientID, http.RoundTripper) http.RoundTripper
}

Metrics is an interface for the metrics to be supported by the provider.

type Provider

type Provider interface {
	// Create creates a metrics provider instance
	Create() error
	// Destroy destroys the metrics provider instance
	Destroy() error
	// Metrics providers metrics
	Metrics(
		version string,
		domain string,
		scope string,
	) Metrics
}

Provider is an interface for metrics provider.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL