Skip to content

[Lens] Decide where to store annotation data that is authored in Lens #87562

@wylieconlon

Description

@wylieconlon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:LensTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//discusstechnical debtImprovement of the software architecture and operational architecture

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions