Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Counters, Summaries and Histograms with creation timestamp #1313

Merged
merged 4 commits into from
Sep 21, 2023

Commits on Sep 20, 2023

  1. Extend Counters, Summaries and Histograms with creation timestamp

    Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
    Arthur Silva Sens committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    c0994f7 View commit details
    Browse the repository at this point in the history
  2. Backport created timestamp to existing tests

    Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
    Arthur Silva Sens committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    0427023 View commit details
    Browse the repository at this point in the history
  3. Last touches (readability and consistency)

    Changes:
    
    * Comments for "now" are more explicit and not inlined.
    * populateMetrics is simpler and bit more efficient without timestamp to time to timestamp conversionts for more common code.
    * Test consistency and simplicity - the fewer variables the better.
    * Fixed inconsistency for v2 and MetricVec - let's pass opt.now consistently.
    * We don't need TestCounterXXXTimestamp - we test CT in many other places already.
    * Added more involved test for counter vectors with created timestamp.
    * Refactored normalization for simplicity.
    * Make histogram, summaries now consistent.
    * Simplified histograms CT flow and implemented proper CT on reset.
    
    TODO for next PRs:
    * NewConstSummary and NewConstHistogram - ability to specify CTs there.
    
    Signed-off-by: bwplotka <bwplotka@gmail.com>
    bwplotka authored and Arthur Silva Sens committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    6f8bab8 View commit details
    Browse the repository at this point in the history
  4. Update prometheus/counter_test.go

    Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
    Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
    2 people authored and Arthur Silva Sens committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    e5639d1 View commit details
    Browse the repository at this point in the history