Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AttributeKeyClientID = attribute.Key("authgear.client_id")
AttributeKeyClientID defines the attribute.
var AttributeKeyProjectID = attribute.Key("authgear.project_id")
AttributeKeyProjectID defines the attribute.
var AttributeKeyStatus = attribute.Key("status")
AttributeKeyStatus defines the attribute.
var AttributeStatusError = AttributeKeyStatus.String("error")
AttributeStatusError is "status=error".
var AttributeStatusOK = AttributeKeyStatus.String("ok")
AttributeStatusOK is "status=ok".
var CounterAuthflowSessionCreationCount = mustInt64Counter( "authgear.authflow_session.creation.count", metric.WithDescription("The number of creation of Authflow session"), metric.WithUnit("{session}"), )
var CounterCSRFRequestCount = mustInt64Counter( "authgear.csrf.request.count", metric.WithDescription("The number of HTTP request with CSRF protection"), metric.WithUnit("{request}"), )
CounterCSRFRequestCount has the following labels: - AttributeKeyStatus
var CounterEmailRequestCount = mustInt64Counter( "authgear.email.request.count", metric.WithDescription("The number of email request"), metric.WithUnit("{request}"), )
CounterEmailRequestCount has the following labels: - AttributeKeyStatus
var CounterOAuthAccessTokenRefreshCount = mustInt64Counter( "authgear.oauth_access_token.refresh.count", metric.WithDescription("The number of access token obtained via a refresh token"), metric.WithUnit("{token}"), )
var CounterOAuthAuthorizationCodeConsumptionCount = mustInt64Counter( "authgear.oauth_authorization_code.consumption.count", metric.WithDescription("The number of consumption of OAuth authorization code"), metric.WithUnit("{code}"), )
var CounterOAuthAuthorizationCodeCreationCount = mustInt64Counter( "authgear.oauth_authorization_code.creation.count", metric.WithDescription("The number of creation of OAuth authorization code"), metric.WithUnit("{code}"), )
var CounterOAuthSessionCreationCount = mustInt64Counter( "authgear.oauth_session.creation.count", metric.WithDescription("The number of creation of OAuth session"), metric.WithUnit("{session}"), )
var CounterSAMLSessionCreationCount = mustInt64Counter( "authgear.saml_session.creation.count", metric.WithDescription("The number of creation of SAML session"), metric.WithUnit("{session}"), )
var CounterSMSRequestCount = mustInt64Counter( "authgear.sms.request.count", metric.WithDescription("The number of SMS request"), metric.WithUnit("{request}"), )
CounterSMSRequestCount has the following labels: - AttributeKeyStatus
var CounterWebSessionCreationCount = mustInt64Counter( "authgear.web_session.creation.count", metric.WithDescription("The number of creation of Web session"), metric.WithUnit("{session}"), )
var CounterWhatsappRequestCount = mustInt64Counter( "authgear.whatsapp.request.count", metric.WithDescription("The number of Whatsapp request"), metric.WithUnit("{request}"), )
CounterWhatsappRequestCount has the following labels: - AttributeKeyStatus
Functions ¶
func IntCounterAddOne ¶
func IntCounterAddOne(ctx context.Context, counter IntCounter, inOptions ...MetricOption)
IntCounterAddOne prepares necessary attributes and calls Add with incr=1. It is intentionally that this does not accept metric.AddOption. If this accepts metric.AddOption, then you can pass in arbitrary metric.WithAttributes. Those attributes MAY NOT be the attributes defined in this package, and could contain unexpected end user data.
Types ¶
type IntCounter ¶
IntCounter is metric.Int64Counter or metric.Int64UpDownCounter
type MetricOption ¶
type MetricOption interface {
// contains filtered or unexported methods
}
func WithStatusError ¶
func WithStatusError() MetricOption
func WithStatusOk ¶
func WithStatusOk() MetricOption