Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Return the name of the metric group/SLO an annotated function is part of #13

Open
gagbo opened this issue Jun 12, 2023 · 0 comments
Open
Labels
enhancement New feature or request
Milestone

Comments

@gagbo
Copy link
Member

gagbo commented Jun 12, 2023

To help diff-metrics produce a version 2 of the dataset to compare, am_list must also return whether an annotated function is part of an SLO group.

To avoid having to manually resolve variable names, the returned name will only be whatever's contained in the annotation directly. If a function is annotated as

#[autometrcs(objective = SOME_CONST_SLO)]
fn handler() {
// ...
}

then the objective_name will just be SOME_CONST_SLO instead of trying to resolve the value.

  1. Not trying to track a constant from lexical analysis across a complete project lowers the difficulty of the task considerably.
  2. It is impossible to actually resolve that const if the value is defined in a dependency crate.
  3. It is impossible to actually resolve that const if the value is fetched from the environment running the application.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant