Categorygithub.com/appoptics/appoptics-api-go
modulepackage
0.5.6
Repository: https://github.com/appoptics/appoptics-api-go.git
Documentation: pkg.go.dev

# README

appoptics-api-go

The official Go client for the AppOptics metrics API.

Documentation Build Status Go Report Card

See Also

AppOptics also provides a Go APM instrumentation library for distributed tracing.

Questions/Comments?

Please open an issue, we'd love to hear from you.

Acknowledgements

This library's client design was partially inspired by the Librato Go client from @henrickhodne.

# Packages

No description provided by the author
No description provided by the author

# Functions

BaseURLClientOption is a config function allowing setting of the base URL the API is on.
ContextWithMeasurementSet wraps the specified context with a MeasurementSet.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewBatchPersister sets up a new instance of batched persistence capabilities using the provided MeasurementsCommunicator.
No description provided by the author
NewClient returns a new AppOptics API client.
NewCounter returns a new SynchronizedCounter initialized to 0.
No description provided by the author
No description provided by the author
NewMeasurement returns a Measurement with the given name and an empty attributes map.
No description provided by the author
NewMeasurementSet returns a new empty MeasurementSet.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewReporter returns a reporter for a given MeasurementSet, providing a way to sync metric information to AppOptics for a collection of running metrics.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SetDebugMode sets the debugMode struct member to true.
SetHTTPClient allows the user to provide a custom http.Client configuration.
UserAgentClientOption is a config function allowing setting of the User-Agent header in requests.

# Constants

AggregationKey is the key in the Measurement attributes used to tell the AppOptics system to aggregate values.
DefaultPersistenceErrorLimit sets the number of errors that will be allowed before persistence shuts down.
MeasurementPostMaxBatchSize defines the max number of Measurements to send to the API at once.
MetricTagSeparator is used by MetricWithTags as a separator when serializing the metric name and tags as a key for aggregation with measurements matching the same metric name and tags.

# Variables

DefaultSink is a convenience instance of MeasurementSet that can be used to centrally aggregate measurements for an entire process.
ErrBadStatus is returned if the AppOptics API returns a non-200 error code.

# Structs

An Aggregator uses the "summary fields" measurement feature in AppOptics to aggregate multiple values into a single measurement, storing a count/sum/min/max/last that can be periodically sent as a single aggregate measurement.
Alert defines a policy for sending alarms to services when conditions are met.
No description provided by the author
AlertRequest is identical to Alert except for the fact that Services is a []int in AlertRequest.
No description provided by the author
No description provided by the author
No description provided by the author
AnnotationEvent is the main data structure for the Annotations API.
AnnotationLink represents the Link metadata for on the AnnotationEvent.
No description provided by the author
AnnotationStream is a group of AnnotationEvents with a common name, representing a timeseries of occurrences of similar events.
No description provided by the author
No description provided by the author
No description provided by the author
BatchPersister implements persistence to AppOptics and enforces error limits.
No description provided by the author
No description provided by the author
Client implements ServiceAccessor.
ErrorResponse represents the response body returned when the API reports an error.
Job is the representation of a task happening in the AppOptics cloud.
No description provided by the author
No description provided by the author
No description provided by the author
ListSpacesResponse represents the returned data payload from Spaces API's List command (/spaces).
Measurement wraps the corresponding API construct: https://docs.appoptics.com/api/#measurements Each Measurement represents a single timeseries value for an associated Metric.
MeasurementsBatch is a collection of Measurements persisted to the API at the same time.
MeasurementSet represents a map of SynchronizedCounters and SynchronizedAggregators.
No description provided by the author
MeasurementsService implements MeasurementsCommunicator.
Metric is an AppOptics Metric.
MetricAttributes are key/value pairs of metadata about the Metric.
No description provided by the author
No description provided by the author
MetricUpdatePayload will apply the state represented by Attributes to the Metrics identified by Names.
No description provided by the author
No description provided by the author
PaginationParameters holds pagination values https://docs.appoptics.com/api/?shell#request-parameters.
QueryInfo holds pagination information coming from list actions.
Reporter provides a way to persist data from a set collection of Aggregators and Counters at a regular interval.
No description provided by the author
RetrieveSpaceResponse represents the returned data payload from Spaces API's Retrieve command (/spaces/:id).
No description provided by the author
No description provided by the author
No description provided by the author
Snapshot represents a portrait of a Chart at a specific point in time.
SnapshotChart contains the metadata for the chart requested in the Snapshot.
No description provided by the author
Space represents a single AppOptics Space.
No description provided by the author
No description provided by the author
SynchronizedAggregator augments an Aggregator with a mutex to allow concurrent access from multiple goroutines.
Tag represents an AppOptics Tag, used in Measurements, Charts, etc.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
AnnotationsCommunicator provides an interface to the Annotations API from AppOptics.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MeasurementsCommunicator defines an interface for communicating with the Measurements portion of the AppOptics API.
No description provided by the author
ServiceAccessor defines an interface for talking to via domain-specific service constructs.
No description provided by the author
No description provided by the author
SpacesCommunicator defines the interface for the Spaces API.

# Type aliases

ClientOption provides functional option-setting behavior.
SynchronizedCounter wraps an int64 with functions to concurrently add/increment and to periodically query & reset the sum.