PrometheusMeter
Overview
Config yaml format becomes like below. And the resource specific spec is defined in in the proto format shown in the Resource Definition.
apiVersion: app/v1
kind: PrometheusMeter
metadata:
name: "default"
namespace: "default"
spec: {}
Resource Definition
PrometheusMeter is defined in the proto/app/v1/o11y/prommeter.proto
syntax = "proto3";
package app.v1;
import "core/v1/http.proto";
import "kernel/resource.proto";
option go_package = "github.com/aileron-gateway/aileron-gateway/apis/app/v1";
// PrometheusMeter resource definition.
// apiVersion="app/v1", kind="PrometheusMeter".
message PrometheusMeter {
string APIVersion = 1 [json_name = "apiVersion"];
string Kind = 2 [json_name = "kind"];
kernel.Metadata Metadata = 3 [json_name = "metadata"];
PrometheusMeterSpec Spec = 4 [json_name = "spec"];
}
// PrometheusMeterSpec is the specifications for the PrometheusHandler object.
message PrometheusMeterSpec {
// [OPTIONAL]
// Patterns is path patterns that this handler
// is registered to a server.
// Default is not set, or empty string ["/"].
repeated string Patterns = 10 [json_name = "patterns"];
// [OPTIONAL]
// Methods is the list of HTTP method this handler can handle.
// Note that it depends on the multiplexer, or HTTP router,
// that the server uses if this field is used or not.
// Default multiplexer does not use this field.
// Default is not set.
repeated core.v1.HTTPMethod Methods = 11 [json_name = "methods"];
}
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.