spec
spec copied to clipboard
Component Model contains metric spec
We have been working on the definition and implementation of the application specification, and we are very excited to find Like-minded organization.
Here's a question we're thinking about and discuss it with you.
For components, each component can have its own resource-layer-common and business-layer-customized monitoring metrics. There is a consensus in cloud-native systems to define metric based on the Prometheus specification. Components should be allowed to define endpoints of their own exposure metrics. The platform layer's metrics servers can be unitedly collected and applied to components of automated operations processes, such as automatic scaling and monitoring visualization.
Such as:
metrics:
- path: "/metric"
port: 8080
type: prometheus
I don't get the question. Could you provide more examples on the problems?
ref https://github.com/oam-dev/spec/issues/153, i.e. Developer has opinion to Traits
/cc @technosophos
@barnettZQG is the idea that components would define the output format of metric data, or the inverse, where a component can specify an endpoint to consume metric data in a specific format?
@vturecek
I agree that first one is important, but both metric format and the endpoint are needed. Then the external service can collect the metrics automatically from the given component.
@hongchaodeng @vturecek The component defines the endpoint of standard monitoring metrics. The main thing is to expose the business metrics of different business services. For example, The API service exposes the API requests per second. But it must follow a certain specification to facilitate the collection of a unified metrics collection platform, such as Prometheus.
However, for some resource metrics, such as memory, CPU, etc., only the component definition needs to be enabled for collection. Data is typically obtained by an external platform such as Kubernetes.
and so. The monitoring metrics section defined in the component model might look like this:
metric:
- enable_resource_metric: true
- custom_metric_endpoint:
- path: "/metric"
port: 8080
type: prometheus
Great! Thanks for explanation!
In the ComponentSchematic type, the parameters section is the place to define those dev input.