Documentation ¶
Index ¶
- type Instrumentation
- func (i Instrumentation) Done()
- func (i Instrumentation) FeatureToggleRetrievalFailed(err error)
- func (i Instrumentation) FeatureToggleRetrievalSucceed()
- func (i Instrumentation) LongLinkRetrievalFailed(err error)
- func (i Instrumentation) LongLinkRetrievalSucceed()
- func (i Instrumentation) MadeFeatureDecision(featureID string, isEnabled bool)
- func (i Instrumentation) RedirectedAliasToLongLink(shortLink entity.ShortLink)
- func (i Instrumentation) RedirectingAliasToLongLink(alias string)
- func (i Instrumentation) SearchFailed(err error)
- func (i Instrumentation) SearchSucceed(user *entity.User, keywords string, resources []string)
- func (i Instrumentation) Track(event string)
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 (Instrumentation) RedirectedAliasToLongLink ¶
func (i Instrumentation) RedirectedAliasToLongLink(shortLink entity.ShortLink)
RedirectedAliasToLongLink tracks RedirectedAliasToLongLink event.
func (Instrumentation) RedirectingAliasToLongLink ¶
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.