Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Meter ¶ added in v0.7.0
type Meter struct {
MP *sdkmetric.MeterProvider
Meter otelmetric.Meter
Prometheus *PrometheusExporter
// contains filtered or unexported fields
}
Meter wraps an OTel MeterProvider and exposes a Meter for creating instruments.
func New ¶ added in v0.7.0
New creates a new MeterProvider configured with an OTLP exporter (same collector as tracing) when metrics are enabled, or a no-op provider for testing and when disabled.
func NewForTesting ¶ added in v0.7.0
NewForTesting returns a Meter backed by a no-op provider.
func (*Meter) HTTPHandler ¶ added in v0.7.0
HTTPHandler returns the Prometheus scrape HTTP handler, or nil if metrics are disabled.
type PrometheusExporter ¶ added in v0.7.0
PrometheusExporter holds the Prometheus reader and an HTTP handler for scraping.
func NewPrometheusExporter ¶ added in v0.7.0
func NewPrometheusExporter() (*PrometheusExporter, error)
NewPrometheusExporter creates a Prometheus exporter that can be added as a reader to the MeterProvider and also serves /metrics for scraping.
type VCI ¶ added in v0.7.0
type VCI struct {
// OffersCreated counts credential offers generated.
// Attributes: grant_type, credential_config_id, source
OffersCreated metric.Int64Counter
// TokensIssued counts access tokens issued at the token endpoint.
// Attributes: grant_type
TokensIssued metric.Int64Counter
// CredentialsIssued counts successfully issued credentials.
// Attributes: format, credential_config_id
CredentialsIssued metric.Int64Counter
// CredentialsFailed counts credential issuance failures.
// Attributes: format, error_class
CredentialsFailed metric.Int64Counter
// DeferredCredentials counts deferred credential retrievals.
// Attributes: status (issued, pending, expired)
DeferredCredentials metric.Int64Counter
// Notifications counts wallet notification events.
// Attributes: event (credential_accepted, credential_failure)
Notifications metric.Int64Counter
// TokenLatency records token endpoint request duration.
// Attributes: grant_type
TokenLatency metric.Float64Histogram
// IssuanceLatency records credential endpoint request duration.
// Attributes: format
IssuanceLatency metric.Float64Histogram
}
VCI holds OpenID4VCI (credential issuance) metric instruments. Labels are restricted to protocol-level metadata to avoid PII exposure.
type VP ¶ added in v0.7.0
type VP struct {
// RequestsCreated counts verification request objects created.
// Attributes: (none — all requests are equivalent)
RequestsCreated metric.Int64Counter
// PresentationsReceived counts VP tokens received via direct_post.
// Attributes: format
PresentationsReceived metric.Int64Counter
// VerificationsFailed counts presentation verification failures.
// Attributes: error_class
VerificationsFailed metric.Int64Counter
// VerificationLatency records direct_post processing duration.
// Attributes: (none)
VerificationLatency metric.Float64Histogram
}
VP holds OpenID4VP (verifiable presentation) metric instruments. Labels are restricted to protocol-level metadata to avoid PII exposure.