The Elastic APM integration became generally available in 7.16 — see the APM Guide for updated documentation. Standalone APM Server users can see the Legacy APM Overview and Legacy APM Server Reference.
Update existing data
editUpdate existing data
editYou might want to update documents that are already indexed. For example, if you your service name was set incorrectly.
To do this, you can use the Update By Query API.
Rename a service
editTo rename a service, send the following request:
POST /apm-*/_update_by_query { "query": { "term": { "context.service.name": { "value": "old-service-name" } } }, "script": { "source": "ctx._source.context.service.name = 'new-service-name'", "lang": "painless" } }
Remember to also change the service name in the APM agent configuration.