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

Refactoring prometheus metrics and labels #2375

Merged
merged 1 commit into from
Mar 2, 2022
Merged

Conversation

sanketsudake
Copy link
Member

@sanketsudake sanketsudake commented Mar 2, 2022

This change mainly fixes few things around router and executor
exposed metrices.

  1. We are trying to follow standard in metric names.
  2. Lables such as namespace are colliding with kube-prometheus standards
    so they are getting relabled to exported_namespace. Added function prefix
    to resolve this.
  3. Also made required changes in canary config Prometheus queries.

Signed-off-by: Sanket Sudake sanketsudake@gmail.com

Description

Router

  • Labels changed
    • name to function_name
    • namespace to function_namespace
  • Changes affects following metrics exposed by router
    • fission_function_calls_total
    • fission_function_errors_total
    • fission_function_duration_seconds
    • fission_function_overhead_seconds
    • fission_function_response_size_bytes

Executor

  • Labels
    • funcname -> function_name
    • funcuid -> function_uid
    • funcaddress -> function_address
  • Metrics
    • fission_cold_starts_total -> fission_function_cold_starts_total
    • fission_func_running_seconds_summary -> fission_function_running_seconds
    • fission_func_alive_seconds_summary -> fission_function_alive_seconds
    • fission_func_is_alive -> fission_function_is_alive
    • fission_pod_reaptime_seconds -> fission_function_pod_reaptime_seconds
    • fission_idle_pod_time -> fission_function_idle_pod_time

Reference

prometheus/prometheus#9832

Which issue(s) this PR fixes:

Fixes #

Testing

Checklist:

  • I ran tests as well as code linting locally to verify my changes.
  • I have done manual verification of my changes, changes working as expected.
  • I have added new tests to cover my changes.
  • My changes follow contributing guidelines of Fission.
  • I have signed all of my commits.

This change mainly fixes few things around router and executor
exposed metrices.
1. We are trying to follow standard in metric names.
2. Lables such as namespace are colliding with kube-prometheus standards
so they are getting relabled to exported_namespace. Added function prefix
to resolve this.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
@codecov
Copy link

codecov bot commented Mar 2, 2022

Codecov Report

Merging #2375 (1c80895) into master (10f64a8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2375   +/-   ##
=======================================
  Coverage   18.75%   18.75%           
=======================================
  Files          56       56           
  Lines        6307     6307           
=======================================
  Hits         1183     1183           
  Misses       5040     5040           
  Partials       84       84           
Flag Coverage Δ
unittests 18.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/router/metrics.go 93.02% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10f64a8...1c80895. Read the comment docs.

@sanketsudake sanketsudake added the documentation All issues related to docs repo: https://github.com/fission/docs.fission.io label Mar 2, 2022
@sanketsudake sanketsudake added this to the 1.16.0 milestone Mar 2, 2022
@sanketsudake sanketsudake merged commit ded1322 into master Mar 2, 2022
@sanketsudake sanketsudake deleted the prom-metric-rename branch March 2, 2022 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation All issues related to docs repo: https://github.com/fission/docs.fission.io
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant