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

 1syntax = "proto3";
 2package app.v1;
 3
 4import "core/v1/http.proto";
 5import "kernel/resource.proto";
 6
 7option go_package = "github.com/aileron-gateway/aileron-gateway/apis/app/v1";
 8
 9// PrometheusMeter resource definition.
10// apiVersion="app/v1", kind="PrometheusMeter".
11message PrometheusMeter {
12    string              APIVersion = 1 [json_name = "apiVersion"];
13    string              Kind       = 2 [json_name = "kind"];
14    kernel.Metadata     Metadata   = 3 [json_name = "metadata"];
15    PrometheusMeterSpec Spec       = 4 [json_name = "spec"];
16}
17
18// PrometheusMeterSpec is the specifications for the PrometheusHandler object.
19message PrometheusMeterSpec {
20    // [OPTIONAL]
21    // Patterns is path patterns that this handler
22    // is registered to a server.
23    // Default is not set, or empty string ["/"].
24    repeated string Patterns = 10 [json_name = "patterns"];
25
26    // [OPTIONAL]
27    // Methods is the list of HTTP method this handler can handle.
28    // Note that it depends on the multiplexer, or HTTP router,
29    // that the server uses if this field is used or not.
30    // Default multiplexer does not use this field.
31    // Default is not set.
32    repeated core.v1.HTTPMethod Methods = 11 [json_name = "methods"];
33}

最終更新 June 7, 2025: add japanese (f2a41f1)