-
Notifications
You must be signed in to change notification settings - Fork 594
scdf provide for tasks metric tag application with unknown value #4299
Description
Description:
The system provide default task properties for every execution:
management.metrics.tags.application=${task.name:unknown}-${task.execution.id:unknown}
as the result the tag "application" for grafana always has value "unknown-unknown".
The possible solution is to adjust the file: spring-cloud-dataflow-server-core/src/main/resources/META-INF/application-task-common-properties-defaults.yml
and replace
management.metrics.tags.application=${task.name:unknown}-${task.execution.id:unknown}
with
management.metrics.tags.application=${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}
but I'm not sure and it's better to have your opinion here.
Release versions:
{
"versions": {
"implementation": {
"name": "spring-cloud-dataflow-server",
"version": "2.7.0"
},
"core": {
"name": "Spring Cloud Data Flow Core",
"version": "2.7.0"
},
"dashboard": {
"name": "Spring Cloud Dataflow UI",
"version": "3.0.0"
},
"shell": {
"name": "Spring Cloud Data Flow Shell",
"version": "2.7.0",
"url": "https://repo1.maven.org/maven2/org/springframework/cloud/spring-cloud-dataflow-shell/2.7.0/spring-cloud-dataflow-shell-2.7.0.jar"
}
},
"features": {
"streams": true,
"tasks": true,
"schedules": true,
"monitoringDashboardType": "GRAFANA"
},
"runtimeEnvironment": {
"appDeployer": {
"deployerImplementationVersion": "2.6.0",
"deployerName": "Spring Cloud Skipper Server",
"deployerSpiVersion": "2.6.0",
"javaVersion": "11.0.8",
"platformApiVersion": "",
"platformClientVersion": "",
"platformHostVersion": "",
"platformSpecificInfo": {
"default": "kubernetes"
},
"platformType": "Skipper Managed",
"springBootVersion": "2.3.5.RELEASE",
"springVersion": "5.2.10.RELEASE"
},
"taskLaunchers": [
{
"deployerImplementationVersion": "2.5.0",
"deployerName": "KubernetesTaskLauncher",
"deployerSpiVersion": "2.5.0",
"javaVersion": "11.0.8",
"platformApiVersion": "v1",
"platformClientVersion": "unknown",
"platformHostVersion": "unknown",
"platformSpecificInfo": {
"namespace": "default",
"master-url": "https://10.96.0.1:443/"
},
"platformType": "Kubernetes",
"springBootVersion": "2.3.5.RELEASE",
"springVersion": "5.2.10.RELEASE"
}
]
},
"monitoringDashboardInfo": {
"url": "https://grafana:3000",
"source": "default-scdf-source",
"refreshInterval": 15
},
"security": {
"isAuthentication": false,
"isAuthenticated": false,
"username": null,
"roles": []
}
}
Steps to reproduce:
- follow by instructions as described here: https://dataflow.spring.io/docs/installation/kubernetes/kubectl/ + install grafana
- install task with metrics support: app register --name myTask --type task --uri docker://springcloud/task-demo-metrics:latest
- create task: task create --name task1 --definition "myTask"
- task launch --name task1
- visit grafana dashboad for tasks and try query the data (http://grafana/explore?orgId=1&left=%5B%22now-24h%22,%22now%22,%22ScdfPrometheus%22,%7B%22expr%22:%22spring_batch_chunk_write_seconds_count%22%7D,%7B%22ui%22:%5Btrue,true,true,%22none%22%5D%7D%5D)