Default tags/labels on configuration

(Frederico Costa Galvão) #1

Kibana version:
Elasticsearch version:
APM Server version:
APM Agent language and version:


Is there a way or plan for it to be possible to add default tags/labels to the transaction instrumentation on java (or any other language, I guess)?

For example, I'm setting up APM for a whole universe of environments, host machines, groups of running services, and each group is semantically separated from each other by name (and sometimes even contract type, data visibility, etc). I'll have a single global elastic cluster to receive all APM/beat data from all of those groups/services, but I'd like to separate them accordingly when needed (infrastructure between them vary a lot, and it'd be unfair to compare all instances of a service performance-wise).

So, what I thought was adding manually a tag/label indicating the ecosystem (it's the name we use for a group of services/customers/hosts in the same infrastructure) that service is running in. I know I can do it for each transaction/request, but it'd be idea if I could inform these default tags/labels during setup/attach time, so that all transactions/instrumentation could automatically reuse them on that agent lifecycle.

I'm sure this would come in handy for a lot of use cases where such tags/labels were to be set per-request on a multi-servlet-one-container environment too.

Is this already possible somehow? Would it be a welcome change to the API?

(Andrew Wilkins) #2

Hi @fredgalvao,

Thanks for raising the question! I think would address your requirements. Did I understand you correctly?


(Frederico Costa Galvão) #3

You did understand it perfectly. I was naive to think this would be something new or local to java agents, and didn't think better to look for it in the apm repo or in the other agents.
There's even an issue for the java one specifically:

I'll make sure to follow them closely, and I'm looking forward to them being available!
Thanks for your time, @axw.

(Felix Barnsteiner) #4

Implemented via but it needs some changes in the APM Server.

(Felix Barnsteiner) #5

In the mean time, you can use this option and just concatenate all the environment identifiers.

(Frederico Costa Galvão) #6

Thanks for the tip, @felixbarny! I'm afraid of waiting for the next java-agent version, because I'm seeing it'll cascade into waiting for the next apm-server version, which will only come with ES7.0 (which I don't know when will reach GA).

(Felix Barnsteiner) #7

I’m afraid it’s already too late to I introduce new features in 7.0, so 7.1 would be more likely. Is the workaround via environment good enough for you in the mean time?

(Frederico Costa Galvão) #8

I'll manage without the default labels. I was actually more interested in the possibility of supplying configuration through the programmatic self-attach API (another topic I created). But anyway, I can manage without it for now.
Thanks for your time!

(Felix Barnsteiner) #9

That will be released soon. In the mean time, you can try out the snapshot from the sonatype snapshot repo. The Maven equivalent would be adding this repository, not sure about grails though.


(system) closed #10

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.