istelemetry

package
v3.32.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package istelemetry contains telemetry functions regarding the collection of data in the IdentityServer.

Index

Constants

View Source
const EntityCountTaskName = "entity-count-task"

EntityCountTaskName is the name of the task that collects entity counts. This is used as the task name in the TaskQueue's callback registry.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option to apply at istelemetry initialization.

func WithBunDB

func WithBunDB(db *bun.DB) Option

WithBunDB sets the DB to be used for the queries.

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Option

WithHTTPClient sets the HTTP client to be used for the requests.

func WithTarget

func WithTarget(target string) Option

WithTarget sets the URL to which the content will be sent to.

func WithUID

func WithUID(uid string) Option

WithUID sets the uid of the task.

type Task

type Task interface {
	// Validate determines if the necessary requirement to run telemetry tasks are set.
	Validate(ctx context.Context) error
	// CountEntities fetches the number of entities in the database and sends it to the target.
	CountEntities(ctx context.Context) error
}

Task is the interface that wraps the EntitiesCountTask method.

func New

func New(opts ...Option) Task

New returns a instance of the identity server telemetry task.

Jump to

Keyboard shortcuts

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