package
0.0.0-20240919032739-eac131825870
Repository: https://github.com/nguyengg/golambda.git
Documentation: pkg.go.dev
# Functions
ClientSideMetricsMiddleware creates a new middleware to add client-side latency metrics about the requests.
Ctx returns the Metrics instance from the specified context if available.
Default adds a ClientSideMetricsMiddleware to the config.
FormatDuration formats the duration in layout 12.345ms.
New creates an empty SimpleMetrics instance.
NewSimpleMetricsContext creates a SimpleMetrics instance attached to the returned context.
No description provided by the author
NewWithStartTime is a variant of New that allows caller to override the startTime property.
TryCtx is a variant of Ctx that does not return NullMetrics.
# Constants
Default counter metrics that are always emitted.
Default counter metrics that are always emitted.
Reserved property keys.
Reserved property keys.
Reserved property keys.
Reserved property keys.
Reserved property keys.
Reserved property keys.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
NullMetrics no-ops on all implementations.
SimpleMetrics is thread-safe by use of mutex.
No description provided by the author
# Interfaces
Metrics contains metrics that can be logged as structured JSON using zerolog.
# Type aliases
Option allows customization of the ClientSideMetricsMiddleware.