package
0.0.0-20250312064113-3b3a4ae01cc1
Repository: https://github.com/digitalocean/do-agent.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
ConvertLFMMapToPrometheusEncodedName converts a metric in the form map[string]string{"__name__":"sonar_cpu","__source__":"user", "cpu":"cpu0"} to sonar_cpu{__source__="user",cpu="cpu0",host_id="899669",mode="iowait",user_id="208897"}.
GetLFM returns an lfm corresponding to a definition.
New creates a new client.
NewDefinition returns a new definition.
NewDefinitionFromMap returns a new definition with common labels for each given value, a "__name__" key must also be present.
ParseMetricDelimited parses a delimited message.
WithCommonLabels includes common labels.
WithDefaultLimits set default metric limits.
WithMeasuredLabels includes labels.
WithMetadataEndpoint overrides the default metadata endpoint, this option is only applicable to non-trusted clients (i.e.
WithRadarEndpoint overrides the default radar endpoint, this option is only applicable to non-trusted clients (i.e.
WithTimeout overrides the default wharf endpoint.
WithTrustedAppKey disables metadata authentication; trusted apps can override the host_id and user_id tags.
WithUserAgent overrides the http user agent.
WithWharfEndpoint overrides the default wharf endpoint, this option must be set when WithTrustedAppKey is used.
WithWharfEndpoints overrides the default wharf endpoint, this option must be set when WithTrustedAppKey is used.
WithWharfEndpointSSLHostname overrides the default wharf endpoint, this option must be set when WithTrustedAppKey is used.
# Variables
ErrCircuitBreaker happens when there are many back to back failures sending metrics, the client will deliberately fail in order to reduce network load on the server.
ErrFlushTooFrequent happens if the client attempts to flush metrics faster than what the server requested.
ErrLabelMissmatch happens if the number of supplied labels is incorrect.
ErrSendTooFrequent happens if the client attempts to send metrics faster than what the server requested.
ErrWriteFailure happens when the writer fails to write to the remote.
# Structs
ClientOptions are client options.
Definition holds the description of a metric.
DefinitionOpts can be changed with opt setters.
HTTPClient is used to send metrics via http.
UnexpectedHTTPStatusError is returned when an unexpected HTTP status is returned when making a registry api call.
# Interfaces
Client is an interface for sending batches of metrics.
# Type aliases
ClientOptFn allows for overriding options.
DefinitionOpt is an option initializer for metric registration.