Documentation ¶
Index ¶
- Constants
- Variables
- func HttpCodeToString(code int) string
- type AgentMetricsHandler
- type PipelineMetricsHandler
- type PrometheusMetrics
- func (pm *PrometheusMetrics) AddLoadedModelMetrics(internalModelName string, memBytes uint64, isLoad, isSoft bool)
- func (pm *PrometheusMetrics) AddModelHistogramMetricsHandler(baseHandler http.HandlerFunc) http.HandlerFunc
- func (pm *PrometheusMetrics) AddModelInferMetrics(externalModelName string, internalModelName string, method string, ...)
- func (pm *PrometheusMetrics) AddServerReplicaMetrics(memory uint64, memoryWithOvercommit float32)
- func (pm *PrometheusMetrics) Start(port int) error
- func (pm *PrometheusMetrics) Stop() error
- func (pm *PrometheusMetrics) UnaryServerInterceptor() ...
- type PrometheusPipelineMetrics
- func (pm *PrometheusPipelineMetrics) AddPipelineInferMetrics(pipelineName string, method string, latency float64, code string)
- func (pm *PrometheusPipelineMetrics) HttpCodeToString(code int) string
- func (pm *PrometheusPipelineMetrics) Start(port int) error
- func (pm *PrometheusPipelineMetrics) Stop() error
Constants ¶
View Source
const ( SeldonModelMetric = "model" SeldonInternalModelMetric = "model_internal" SeldonServerMetric = "server" SeldonServerReplicaMetric = "server_replica" MethodTypeMetric = "method_type" MethodTypeRest = "rest" MethodTypeGrpc = "grpc" MethodMetric = "method" CodeMetric = "code" )
Metric labels
View Source
const (
SeldonPipelineMetric = "pipeline"
)
Docs End Metrics Keep above line as used in docs Metric labels
Variables ¶
View Source
var (
DefaultHistogramBuckets = []float64{0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10}
)
Functions ¶
func HttpCodeToString ¶
Types ¶
type AgentMetricsHandler ¶
type AgentMetricsHandler interface { AddModelHistogramMetricsHandler(baseHandler http.HandlerFunc) http.HandlerFunc UnaryServerInterceptor() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) AddModelInferMetrics(externalModelName string, internalModelName string, method string, elapsedTime float64, code string) AddLoadedModelMetrics(internalModelName string, memory uint64, isLoad, isSoft bool) AddServerReplicaMetrics(memory uint64, memoryWithOvercommit float32) }
TODO Revisit splitting this interface as metric handling matures
type PipelineMetricsHandler ¶
type PipelineMetricsHandler interface {
AddPipelineInferMetrics(pipelineName string, method string, elapsedTime float64, code string)
}
TODO Revisit splitting this interface as metric handling matures
type PrometheusMetrics ¶
type PrometheusMetrics struct {
// contains filtered or unexported fields
}
func NewPrometheusModelMetrics ¶
func NewPrometheusModelMetrics(serverName string, serverReplicaIdx uint, logger log.FieldLogger) (*PrometheusMetrics, error)
func (*PrometheusMetrics) AddLoadedModelMetrics ¶
func (pm *PrometheusMetrics) AddLoadedModelMetrics(internalModelName string, memBytes uint64, isLoad, isSoft bool)
func (*PrometheusMetrics) AddModelHistogramMetricsHandler ¶
func (pm *PrometheusMetrics) AddModelHistogramMetricsHandler(baseHandler http.HandlerFunc) http.HandlerFunc
func (*PrometheusMetrics) AddModelInferMetrics ¶
func (*PrometheusMetrics) AddServerReplicaMetrics ¶
func (pm *PrometheusMetrics) AddServerReplicaMetrics(memory uint64, memoryWithOvercommit float32)
func (*PrometheusMetrics) Start ¶
func (pm *PrometheusMetrics) Start(port int) error
func (*PrometheusMetrics) Stop ¶
func (pm *PrometheusMetrics) Stop() error
func (*PrometheusMetrics) UnaryServerInterceptor ¶
func (pm *PrometheusMetrics) UnaryServerInterceptor() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
type PrometheusPipelineMetrics ¶
type PrometheusPipelineMetrics struct {
// contains filtered or unexported fields
}
func NewPrometheusPipelineMetrics ¶
func NewPrometheusPipelineMetrics(logger log.FieldLogger) (*PrometheusPipelineMetrics, error)
func (*PrometheusPipelineMetrics) AddPipelineInferMetrics ¶
func (pm *PrometheusPipelineMetrics) AddPipelineInferMetrics(pipelineName string, method string, latency float64, code string)
func (*PrometheusPipelineMetrics) HttpCodeToString ¶
func (pm *PrometheusPipelineMetrics) HttpCodeToString(code int) string
func (*PrometheusPipelineMetrics) Start ¶
func (pm *PrometheusPipelineMetrics) Start(port int) error
func (*PrometheusPipelineMetrics) Stop ¶
func (pm *PrometheusPipelineMetrics) Stop() error
Click to show internal directories.
Click to hide internal directories.