instrumentation

package
v0.0.0-...-57b459a Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instrumentation

type Instrumentation struct {
	// contains filtered or unexported fields
}

Instrumentation measures the internal operation of the system.

func NewInstrumentation

func NewInstrumentation(
	logger logger.Logger,
	timer timer.Timer,
	metrics metrics.Metrics,
	analytics analytics.Analytics,
	ctxCh chan ctx.ExecutionContext,
) Instrumentation

NewInstrumentation initializes instrumentation code.

func (Instrumentation) Done

func (i Instrumentation) Done()

Done closes all the channels to prevent memory leak.

func (Instrumentation) FeatureToggleRetrievalFailed

func (i Instrumentation) FeatureToggleRetrievalFailed(err error)

FeatureToggleRetrievalFailed tracks the failures when retrieving the status of the feature toggle.

func (Instrumentation) FeatureToggleRetrievalSucceed

func (i Instrumentation) FeatureToggleRetrievalSucceed()

FeatureToggleRetrievalSucceed tracks the successes when retrieving the status of the feature toggle.

func (Instrumentation) LongLinkRetrievalFailed

func (i Instrumentation) LongLinkRetrievalFailed(err error)

LongLinkRetrievalFailed tracks the failures when retrieving long links.

func (Instrumentation) LongLinkRetrievalSucceed

func (i Instrumentation) LongLinkRetrievalSucceed()

LongLinkRetrievalSucceed tracks the successes when retrieving long links.

func (Instrumentation) MadeFeatureDecision

func (i Instrumentation) MadeFeatureDecision(
	featureID string,
	isEnabled bool,
)

MadeFeatureDecision tracks MadeFeatureDecision event.

func (i Instrumentation) RedirectedAliasToLongLink(shortLink entity.ShortLink)

RedirectedAliasToLongLink tracks RedirectedAliasToLongLink event.

func (i Instrumentation) RedirectingAliasToLongLink(alias string)

RedirectingAliasToLongLink tracks RedirectingAliasToLongLink event.

func (Instrumentation) SearchFailed

func (i Instrumentation) SearchFailed(err error)

SearchFailed tracks the failures when searching the short resources.

func (Instrumentation) SearchSucceed

func (i Instrumentation) SearchSucceed(user *entity.User, keywords string, resources []string)

SearchSucceed tracks the successes when searching the short resources.

func (Instrumentation) Track

func (i Instrumentation) Track(event string)

Track records events happened in the system.

Jump to

Keyboard shortcuts

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