Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add operation configuration to gauge metric. Fixes #10662 #10774

Merged
merged 6 commits into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4779,12 +4779,16 @@
"io.argoproj.workflow.v1alpha1.Gauge": {
"description": "Gauge is a Gauge prometheus metric",
"properties": {
"operation": {
"description": "Operation defines the operation to apply with value and the metrics' current value",
"type": "string"
},
"realtime": {
"description": "Realtime emits this metric in real time if applicable",
"type": "boolean"
},
"value": {
"description": "Value is the value of the metric",
"description": "Value is the value to be used in the operation with the metric's current value. If no operation is set, value is the value of the metric",
"type": "string"
}
},
Expand Down
6 changes: 5 additions & 1 deletion api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -8714,12 +8714,16 @@
"realtime"
],
"properties": {
"operation": {
"description": "Operation defines the operation to apply with value and the metrics' current value",
"type": "string"
},
"realtime": {
"description": "Realtime emits this metric in real time if applicable",
"type": "boolean"
},
"value": {
"description": "Value is the value of the metric",
"description": "Value is the value to be used in the operation with the metric's current value. If no operation is set, value is the value of the metric",
"type": "string"
}
}
Expand Down
15 changes: 14 additions & 1 deletion docs/executor_swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -1661,8 +1661,21 @@ If this is not specified, the default behavior is defined by gRPC.

| Name | Type | Go type | Required | Default | Description | Example |
|------|------|---------|:--------:| ------- |-------------|---------|
| operation | [GaugeOperation](#gauge-operation)| `GaugeOperation` | | | | |
| realtime | boolean| `bool` | | | Realtime emits this metric in real time if applicable | |
| value | string| `string` | | | Value is the value of the metric | |
| value | string| `string` | | | Value is the value to be used in the operation with the metric's current value. If no operation is set,
value is the value of the metric | |



### <span id="gauge-operation"></span> GaugeOperation




| Name | Type | Go type | Default | Description | Example |
|------|------|---------| ------- |-------------|---------|
| GaugeOperation | string| string | | | |



Expand Down
3 changes: 2 additions & 1 deletion docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -3591,8 +3591,9 @@ Gauge is a Gauge prometheus metric
### Fields
| Field Name | Field Type | Description |
|:----------:|:----------:|---------------|
|`operation`|`string`|Operation defines the operation to apply with value and the metrics' current value|
|`realtime`|`boolean`|Realtime emits this metric in real time if applicable|
|`value`|`string`|Value is the value of the metric|
|`value`|`string`|Value is the value to be used in the operation with the metric's current value. If no operation is set, value is the value of the metric|

## Histogram

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -6810,6 +6812,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -14899,6 +14903,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down
6 changes: 6 additions & 0 deletions manifests/base/crds/full/argoproj.io_cronworkflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -6831,6 +6833,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -14920,6 +14924,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down
14 changes: 14 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1607,6 +1607,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -6824,6 +6826,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -14913,6 +14917,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -26589,6 +26595,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -31292,6 +31300,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -36509,6 +36519,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -44598,6 +44610,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflowtasksets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4981,6 +4981,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down
6 changes: 6 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -6809,6 +6811,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down Expand Up @@ -14898,6 +14902,8 @@ spec:
type: object
gauge:
properties:
operation:
type: string
realtime:
type: boolean
value:
Expand Down
Loading