[Java] Change agent labels in runtime for instance

Hi, i have a question about new relic labels.
Could we change labels that send some application instance (using java apm) in runtime in any programmatically way?

Hi, @vladyslav.manzhula: I am a bit confused. The subject of your topic says, “infrastructure agent”, but the tags say, “apm, javaagent” and you mention Java APM in your question.

Are you asking about the Java APM agent, or the Infrastructure agent?

Sorry, my question about Java APM agent

@philweber Hi, do you have any ideas?

You may find this document helpful: NerdGraph tutorial: View and add tags | New Relic Documentation.

@philweber Thx, but i don’t see information covering my case(
I have different instances with different tags witch send metrics to one entity. Is it some way to attach(or change existing) tag not to the entity but to the instance wich send metrics with thats tag? I know about NEW_RELIC_LABELS env variable, but is it only one way to set tag for instance?

I do not know of any way to do that. Perhaps someone else will have a suggestion.