influxdb/annotations
cui fliter 46ec649b9c
chore: fix function name in comment (#24281)
2023-06-14 11:18:13 -04:00
..
transport feat(annotations): storage service (#21690) 2021-06-15 18:36:11 -04:00
README.md docs: README for annotations, notebooks, and sqlite (#21832) 2021-07-12 12:18:12 -05:00
middleware_logging.go feat(annotations): add logging and metrics to annotations service (#22271) 2021-08-20 14:28:37 -06:00
middleware_metrics.go feat(annotations): add logging and metrics to annotations service (#22271) 2021-08-20 14:28:37 -06:00
service.go chore: fix function name in comment (#24281) 2023-06-14 11:18:13 -04:00
service_test.go test: use `T.TempDir` to create temporary test directory (#23258) 2023-03-21 16:22:11 -04:00

README.md

Annotations

This package provides an HTTP API for interacting with both annotations and streams independently. The HTTP handlers are located in the transport folder. The code for interacting with the sqlite datastore is located in the service.go file. Definitions for the basic types & interfaces associated with annotations and streams used throughout the platform are located in the top-level influxdb package, in the annotation.go file.

Anatomy

An annotation is, at its simplest, a textual note on a range of time. The start and stop time of that range can be the same point in time, which represents an annotation at a single instance. Annotations can also have "stickers". "Stickers" allow users to "tag" the annotation with further granularity for filtering in key-value pairs. Some examples of sticker key-value pairs are: "product: oss", "product: cloud", or "service: tasks", but keys and values can be any string.

Every annotation belongs to a single "stream". A "stream" represents a logical grouping of annotated events. Some examples of stream names are: "incidents", "deployments", or "marketing", but can be any string. A stream can also have a description to further clarify what annotated events may be expected in the stream.

Use

Requested annotations may be filtered by stream name, stickers, and/or time range. Streams may also be retrieved, in order to view their description. If a stream is deleted, all annotations associated with that stream are deleted as well. Every annotation that is created must have a stream associated with it - if a stream name is not provided when creating an annotation, it will be assigned to the default stream.