Skip to content

Implement MetricManager #1623

Open
Open
@jiacai2050

Description

The main task of MetricManager is to manage metric name of a sample, it will:

  1. Calculate the id for metric name, using seahash. Since there is no field concept in prometheus, we could use a hard-coded one, such as value, and its type is f64.
  2. Persist new name to storage. For existing metric name, we should avoid this step, since it will involve IO operation.
  3. In order to support 2, we need to add a cache, and when server start up, we load all existing metric name into cache.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions