Skip to content

[prometheus][proposal] custom config for standardMetricsΒ #84

@w1mvy

Description

@w1mvy

Hi, This useful middleware has helped us!

Issue Description

There are cases where we want to overwrite some buckets values.
For example, set buckets value of "request_duration_seconds" greather than 10 seconds.

How about defining a config and allowing it to be overridden?

I would like to get your opinion this.

type Config struct {
	OverwriteDefaultMetricsList []OverwriteDefaultMetrics
}

type OverwriteDefaultMetrics struct {
	ID      string    // example "reqDur"
	Buckets []float64 // example []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 20, 40, 80}
}

Checklist

  • Dependencies installed
  • No typos
  • Searched existing issues and docs

Expected behaviour

none

Actual behaviour

none

Steps to reproduce

none

Working code to debug

package main

func main() {
}

Version/commit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions