Using APM labels/tags in NRQL

Hello all. Is there really no way to access Tags or Labels created in APM via NRQL for dashboards? I have read a lot of forums and I found a feature request for it, but the posts in that forum are quite old, so am hoping its changed since then. I’ve seen posts on accessing the tags/labels of Synthetics and Infra via NRQL, but not APM. We have some tags in APM that were added via the agent config file, and then some that I added manually in APM (a couple months ago before everything switched to NROne) and I can’t seem to access either via NRQL. I have a support ticket open ( 418476) as well as orig I thought that some of our tags just werent working or syncing, and there was a bug, but now I see that it is possibly a pattern and just the APM not working, as designed.

Feature request I found: Feature Idea: Allow Selection of Entities for NRQL Alert Conditions

Thank you in advance for any help or workaround options!

1 Like

For best results it has been best to “tag” with attributes using the api for APM. Labels in the UI are basically cosmetic. Labels have been renamed to tags and behave a little different. Of course things can change.

2 Likes

Agreed, it’s weird to experience this inconsistent behaviour between the Entity Explorer filter and Dashboard/NRQL filter, despite their similar nature.

I’d expect when filtering by a tag in the dashboard/NRQL, only data associated with the selected tagged entities will be shown on the graph(s).

2 Likes

Interesting. So if you do it via API then you’ll be able to access it, but doing it in the UI is basically just for looks and not very useful. I’ll dig into this more. We don’t have a lot of write API access, even tho I’m on the SRE team, as we are in a huge enterprise company and don’t ‘own’ our NR instance, political mumbo jumbo over access. Its an ongoing battle, maybe I’ll have to start pushing on that again. I appreciate you both writing back and confirming that I’m not going crazy at least, and it does appear to be true. We meet with our NR reps every other week, so maybe I’ll bring the feature request up to them to try to get some traction. Thanks guys!

Update: I will say that it seems I cant access either type of tag via Insights/NRQL for either the UI created tags, or the tags that are autocreated from labels in the config file on the app server. But hopefully API will be different than either of those and do the trick! if I do get some with API done to test, how do you access them? It seems sometimes its WHERE tags_x = ‘xx’ and sometimes its just. WHERE x = ‘xx’

Hi @Tasha_Gooch it looks like you are working with our support team via a ticket on few of these items. Please do return once resolved to let fellow Explorers know the solutions you implemented. Thanks :slight_smile:

Looking to follow-up if there’s been any progress from the aforementioned Support tickets?

I came across a post on a different thread by @Fidelicatessen which described the following NRQL to filter by tags.

SELECT * FROM SyntheticCheck WHERE tags.environment = 'prod'

That appears to return no results for me, nor does this adaptation to filter Purpose:Migration tagged APM applications.

FROM Transaction SELECT count(*) FACET appName WHERE tags.Purpose = 'Migration'

Perhaps there’s recent documentation that expands upon this area to filter by tags in NRQL?

Tags for Synthetics are different…you expected that right? :wink:

You can find out what you have for event types with Keyset().

1 Like

That’s a tad disappointing, eh.

Looking at the docs:

If you have pre-existing labels for APM or synthetic monitors, you can use them in the same ways you use tags when searching and filtering…

Some of these steps towards consolidation feels somewhat half-baked when it comes to functionality that spans across NR as a whole.

  • You can filter entities by tags on the Entity Explorer | You can’t filter entities by tags in a Dashboard.
  • You can filter tags in NRQL for Synthetics entities | You can’t filter tags in NRQL for APM entities.
  • You can filter entities by Facets in dashboards | You can’t filter entities by Facet Cases in dashboards.
4 Likes

Thanks Rishav - those are fair points! One of our main focal points right now is bringing more consistency across the platform, and this is great feedback. I will take this to our teams and make sure they see it.

3 Likes

That’s great! I hope they really look into the consistencies. Thank you Rishav for expanding and adding those excellent clarifications

2 Likes

Looks to be related closely to this thread.

I guess this is still further down the roadmap?