We are planning to add a Lens feature which lets users author annotations. An annotation for the purposes of Lens has these fields:
- Label
- Start timestamp
- (optional) End timestamp, if we support annotation ranges
- (optional) Icon type
- (optional) Color
- Tags
There are several open questions about how we should store the data. I think there are three outcomes that are possible, and the questions are the factors that will lead us to decide on one of these outcomes:
a. We create a new saved object type called annotation which becomes a standard across Kibana
b. We create a new saved object type called lens-annotation which is available only in Lens
c. We extend the observability-annotations index to support the features described, because annotations are most often used in observability
The easiest factors to address are the reasons not to use saved objects:
- Is it important for end-users to query or insert annotations using their own tools, or can they use the Kibana API?
- Do we expect more than 10k annotations at a time?
- Do we need to aggregate?
- Do we need to bulk update or delete?
My opinion is that the answer is no to all of the above, because I expect that users who want to insert annotations will be able to use the Kibana API. I also expect that we'll provide a way to query annotations from an arbitrary Elasticsearch index which can be self-managed.
The second factor to decide is whether we want to have a single standard of annotations across Kibana. There are two downsides:
- Annotations won't reliably contain custom data, such as solution-specific metadata.
- There are previously-existing indices that we can't replace, so it could be confusing to have a generic storage that isn't actually used generically
I would weight these issues as low-impact, and recommend that we create a new saved object type called annotation that can be used in Lens and solutions.
Related issues and prior discussion:
TSVB annotations should be first class objects
Ability to insert TSVB annotations, not read-only
We are planning to add a Lens feature which lets users author annotations. An annotation for the purposes of Lens has these fields:
There are several open questions about how we should store the data. I think there are three outcomes that are possible, and the questions are the factors that will lead us to decide on one of these outcomes:
a. We create a new saved object type called
annotationwhich becomes a standard across Kibanab. We create a new saved object type called
lens-annotationwhich is available only in Lensc. We extend the
observability-annotationsindex to support the features described, because annotations are most often used in observabilityThe easiest factors to address are the reasons not to use saved objects:
My opinion is that the answer is no to all of the above, because I expect that users who want to insert annotations will be able to use the Kibana API. I also expect that we'll provide a way to query annotations from an arbitrary Elasticsearch index which can be self-managed.
The second factor to decide is whether we want to have a single standard of annotations across Kibana. There are two downsides:
I would weight these issues as low-impact, and recommend that we create a new saved object type called
annotationthat can be used in Lens and solutions.Related issues and prior discussion:
TSVB annotations should be first class objects
Ability to insert TSVB annotations, not read-only