Skip to content

Commit

Permalink
renaming after core changes
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhuie19 committed Nov 4, 2024
1 parent 6861723 commit ad10bf9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
23 changes: 12 additions & 11 deletions observability-lib/dashboards/keystone-workflows/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/grafana/grafana-foundation-sdk/go/alerting"
"github.com/grafana/grafana-foundation-sdk/go/cog"
"github.com/grafana/grafana-foundation-sdk/go/dashboard"

"github.com/smartcontractkit/chainlink-common/observability-lib/grafana"
)

Expand Down Expand Up @@ -38,7 +39,7 @@ func vars(p *Props) []cog.Builder[dashboard.VariableModel] {
Name: "env",
},
Datasource: p.MetricsDataSource.Name,
Query: `label_values(WorkflowsRunning, env)`,
Query: `label_values(platform.engine.workflows.count, env)`,
Multi: false,
}))

Expand All @@ -48,7 +49,7 @@ func vars(p *Props) []cog.Builder[dashboard.VariableModel] {
Name: "cluster",
},
Datasource: p.MetricsDataSource.Name,
Query: `label_values(WorkflowsRunning{env="$env"}, cluster)`,
Query: `label_values(platform.engine.workflows.count{env="$env"}, cluster)`,
}))

variables = append(variables, grafana.NewQueryVariable(&grafana.QueryVariableOptions{
Expand All @@ -57,7 +58,7 @@ func vars(p *Props) []cog.Builder[dashboard.VariableModel] {
Name: "workflowOwner",
},
Datasource: p.MetricsDataSource.Name,
Query: `label_values(WorkflowsRunning{env="$env", cluster="$cluster"}, workflowOwner)`,
Query: `label_values(platform.engine.workflows.count{env="$env", cluster="$cluster"}, workflowOwner)`,
Multi: false,
}))

Expand All @@ -67,7 +68,7 @@ func vars(p *Props) []cog.Builder[dashboard.VariableModel] {
Name: "workflowName",
},
Datasource: p.MetricsDataSource.Name,
Query: `label_values(WorkflowsRunning{env="$env", cluster="$cluster", workflowOwner="$workflowOwner"}, workflowName)`,
Query: `label_values(platform.engine.workflows.count{env="$env", cluster="$cluster", workflowOwner="$workflowOwner"}, workflowName)`,
}))

return variables
Expand All @@ -85,7 +86,7 @@ func general(p *Props) []*grafana.Panel {
Height: 8,
Query: []grafana.Query{
{
Expr: `sum(WorkflowsRunning{` + p.platformOpts.LabelQuery + `}) by (workflowOwner, workflowName)`,
Expr: `sum(platform.engine.workflows.count{` + p.platformOpts.LabelQuery + `}) by (workflowOwner, workflowName)`,
Legend: "{{ workflowOwner }} - {{ workflowName }}",
},
},
Expand All @@ -101,7 +102,7 @@ func general(p *Props) []*grafana.Panel {
NoDataState: alerting.RuleNoDataStateOK,
Query: []grafana.RuleQuery{
{
Expr: `sum(WorkflowsRunning{` + p.AlertsFilters + `})`,
Expr: `sum(platform.engine.workflows.count{` + p.AlertsFilters + `})`,
RefID: "A",
Datasource: p.MetricsDataSource.UID,
},
Expand Down Expand Up @@ -131,7 +132,7 @@ func general(p *Props) []*grafana.Panel {
Height: 8,
Query: []grafana.Query{
{
Expr: `sum(WorkflowsRunning{` + p.platformOpts.LabelQuery + `}) by (status)`,
Expr: `sum(platform.engine.workflows.count{` + p.platformOpts.LabelQuery + `}) by (status)`,
Legend: "{{ status }}",
},
},
Expand All @@ -148,7 +149,7 @@ func general(p *Props) []*grafana.Panel {
Unit: "ms",
Query: []grafana.Query{
{
Expr: `sum(WorkflowExecutionLatency{` + p.platformOpts.LabelQuery + `}) by (workflowExecutionID)`,
Expr: `sum(platform.engine.workflow.time{` + p.platformOpts.LabelQuery + `}) by (workflowExecutionID)`,
Legend: "WorkflowExecID: {{workflowExecutionID}}",
},
},
Expand All @@ -164,7 +165,7 @@ func general(p *Props) []*grafana.Panel {
Height: 8,
Query: []grafana.Query{
{
Expr: `WorkflowStepError{` + p.platformOpts.LabelQuery + `}`,
Expr: `platform.engine.workflow.errors{` + p.platformOpts.LabelQuery + `}`,
Legend: "",
},
},
Expand All @@ -180,7 +181,7 @@ func general(p *Props) []*grafana.Panel {
Height: 8,
Query: []grafana.Query{
{
Expr: `RegisterTriggerFailure{` + p.platformOpts.LabelQuery + `}`,
Expr: `platform.engine.register_trigger.failures{` + p.platformOpts.LabelQuery + `}`,
Legend: "",
},
},
Expand All @@ -196,7 +197,7 @@ func general(p *Props) []*grafana.Panel {
Height: 8,
Query: []grafana.Query{
{
Expr: `CapabilityInvocation{` + p.platformOpts.LabelQuery + `}`,
Expr: `platform.engine.capabilities_invoked.count{` + p.platformOpts.LabelQuery + `}`,
Legend: "",
},
},
Expand Down
22 changes: 11 additions & 11 deletions observability-lib/dashboards/keystone-workflows/test-output.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"id": 1,
"targets": [
{
"expr": "sum(WorkflowsRunning{}) by (workflowOwner, workflowName)",
"expr": "sum(platform.engine.workflows.count{}) by (workflowOwner, workflowName)",
"format": "",
"legendFormat": "{{ workflowOwner }} - {{ workflowName }}",
"refId": ""
Expand Down Expand Up @@ -83,7 +83,7 @@
"id": 2,
"targets": [
{
"expr": "sum(WorkflowsRunning{}) by (status)",
"expr": "sum(platform.engine.workflows.count{}) by (status)",
"format": "",
"legendFormat": "{{ status }}",
"refId": ""
Expand Down Expand Up @@ -133,7 +133,7 @@
"id": 3,
"targets": [
{
"expr": "sum(WorkflowExecutionLatency{}) by (workflowExecutionID)",
"expr": "sum(platform.engine.workflow.time{}) by (workflowExecutionID)",
"format": "",
"legendFormat": "WorkflowExecID: {{workflowExecutionID}}",
"refId": ""
Expand Down Expand Up @@ -183,7 +183,7 @@
"id": 4,
"targets": [
{
"expr": "WorkflowStepError{}",
"expr": "platform.engine.workflow.errors{}",
"format": "",
"legendFormat": "",
"refId": ""
Expand Down Expand Up @@ -233,7 +233,7 @@
"id": 5,
"targets": [
{
"expr": "RegisterTriggerFailure{}",
"expr": "platform.engine.register_trigger.failures{}",
"format": "",
"legendFormat": "",
"refId": ""
Expand Down Expand Up @@ -283,7 +283,7 @@
"id": 6,
"targets": [
{
"expr": "CapabilityInvocation{}",
"expr": "platform.engine.capabilities_invoked.count{}",
"format": "",
"legendFormat": "",
"refId": ""
Expand Down Expand Up @@ -336,7 +336,7 @@
"name": "env",
"label": "Environment",
"description": "",
"query": "label_values(WorkflowsRunning, env)",
"query": "label_values(platform.engine.workflows.count, env)",
"datasource": {
"uid": "Prometheus"
},
Expand All @@ -357,7 +357,7 @@
"name": "cluster",
"label": "Cluster",
"description": "",
"query": "label_values(WorkflowsRunning{env=\"$env\"}, cluster)",
"query": "label_values(platform.engine.workflows.count{env=\"$env\"}, cluster)",
"datasource": {
"uid": "Prometheus"
},
Expand All @@ -378,7 +378,7 @@
"name": "workflowOwner",
"label": "Workflow Owner",
"description": "",
"query": "label_values(WorkflowsRunning{env=\"$env\", cluster=\"$cluster\"}, workflowOwner)",
"query": "label_values(platform.engine.workflows.count{env=\"$env\", cluster=\"$cluster\"}, workflowOwner)",
"datasource": {
"uid": "Prometheus"
},
Expand All @@ -399,7 +399,7 @@
"name": "workflowName",
"label": "Workflow Name",
"description": "",
"query": "label_values(WorkflowsRunning{env=\"$env\", cluster=\"$cluster\", workflowOwner=\"$workflowOwner\"}, workflowName)",
"query": "label_values(platform.engine.workflows.count{env=\"$env\", cluster=\"$cluster\", workflowOwner=\"$workflowOwner\"}, workflowName)",
"datasource": {
"uid": "Prometheus"
},
Expand Down Expand Up @@ -431,7 +431,7 @@
{
"datasourceUid": "1",
"model": {
"expr": "sum(WorkflowsRunning{})",
"expr": "sum(platform.engine.workflows.count{})",
"legendFormat": "__auto",
"refId": "A"
},
Expand Down

0 comments on commit ad10bf9

Please sign in to comment.