package metrics

import "github.com/prometheus/client_golang/prometheus"

const (
	FunctionLabel   = "function"
	HttpMethodLabel = "http_method"
	CodeLabel       = "code"
)

var (
	HttpErrorResultCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: "metrics-integration",
			Subsystem: "http",
			Name:      "request_error",
			Help:      "count of http request error",
		}, []string{FunctionLabel, HttpMethodLabel, CodeLabel})
)

var HttpRequestDuration = prometheus.NewHistogramVec(
	prometheus.HistogramOpts{
		Namespace: "metrics-integration",
		Subsystem: "http",
		Name:      "duration_ms",
		Help:      "duration of http request.",
	}, []string{"url", "method", "status_code"},
)
