otelauthgear

package
v0.0.0-...-f83813f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AttributeKeyClientID = attribute.Key("authgear.client_id")

AttributeKeyClientID defines the attribute.

View Source
var AttributeKeyProjectID = attribute.Key("authgear.project_id")

AttributeKeyProjectID defines the attribute.

View Source
var AttributeKeyStatus = attribute.Key("status")

AttributeKeyStatus defines the attribute.

View Source
var AttributeStatusError = AttributeKeyStatus.String("error")

AttributeStatusError is "status=error".

View Source
var AttributeStatusOK = AttributeKeyStatus.String("ok")

AttributeStatusOK is "status=ok".

View Source
var CounterAuthflowSessionCreationCount = mustInt64Counter(
	"authgear.authflow_session.creation.count",
	metric.WithDescription("The number of creation of Authflow session"),
	metric.WithUnit("{session}"),
)
View Source
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

View Source
var CounterEmailRequestCount = mustInt64Counter(
	"authgear.email.request.count",
	metric.WithDescription("The number of email request"),
	metric.WithUnit("{request}"),
)

CounterEmailRequestCount has the following labels: - AttributeKeyStatus

View Source
var CounterOAuthAccessTokenRefreshCount = mustInt64Counter(
	"authgear.oauth_access_token.refresh.count",
	metric.WithDescription("The number of access token obtained via a refresh token"),
	metric.WithUnit("{token}"),
)
View Source
var CounterOAuthAuthorizationCodeConsumptionCount = mustInt64Counter(
	"authgear.oauth_authorization_code.consumption.count",
	metric.WithDescription("The number of consumption of OAuth authorization code"),
	metric.WithUnit("{code}"),
)
View Source
var CounterOAuthAuthorizationCodeCreationCount = mustInt64Counter(
	"authgear.oauth_authorization_code.creation.count",
	metric.WithDescription("The number of creation of OAuth authorization code"),
	metric.WithUnit("{code}"),
)
View Source
var CounterOAuthSessionCreationCount = mustInt64Counter(
	"authgear.oauth_session.creation.count",
	metric.WithDescription("The number of creation of OAuth session"),
	metric.WithUnit("{session}"),
)
View Source
var CounterSAMLSessionCreationCount = mustInt64Counter(
	"authgear.saml_session.creation.count",
	metric.WithDescription("The number of creation of SAML session"),
	metric.WithUnit("{session}"),
)
View Source
var CounterSMSRequestCount = mustInt64Counter(
	"authgear.sms.request.count",
	metric.WithDescription("The number of SMS request"),
	metric.WithUnit("{request}"),
)

CounterSMSRequestCount has the following labels: - AttributeKeyStatus

View Source
var CounterWebSessionCreationCount = mustInt64Counter(
	"authgear.web_session.creation.count",
	metric.WithDescription("The number of creation of Web session"),
	metric.WithUnit("{session}"),
)
View Source
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

type IntCounter interface {
	Add(ctx context.Context, incr int64, options ...metric.AddOption)
}

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

Jump to

Keyboard shortcuts

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