Is there any way to configure global_labels using Kibana or APM-server API for remote agent configuration, based on service name ?
I can do it in agent configuration, but I would like to manage static labels remotely, thank you
I tried to do it like this:
curl -XPUT 'https://localhost:5601/api/apm/settings/agent-configuration?overwrite=true' -H 'content-type: application/json' -H 'kbn-xsrf: true' -d' { "service": { "name": "my-app" }, "settings": { "transaction_sample_rate": "0.3", "capture_body": "off", "transaction_max_spans": "50" }, "global_labels": { "my_key": "my_value" } }'
Answer:
{"statusCode":400,"error":"Bad Request","message":"Excess keys are not allowed: \nbody.global_labels\nbody.global_labels.my_key"}
Kibana version: 7.17.8
Elasticsearch version: 7.17.8
APM Server version: 7.17.8