Datadog Exclude City or Local Domain

Viewed 127

Using datadog, at the top there are tags / attributes. Can i set this to default to everything but X City? I want to exclude users from our company looking at the data.

tried using ! but doesnt work for overall filtering at top of DD dashboard

1 Answers

That would be a feature request I think. when you use a template variable, the value in the variable is injected into the query. So for example you'd see

$country have @geo.country as the key and you would select a value like Australia. Inside the query you would reference $country which would dereference to @geo.country:Australia.

So if you tried typing -Australia you'd end up with @geo.country:-Australia. When the correct syntax would be -@geo.country:Australia.

The only real hack I can think of here is to create a 'fake' variable called like $excludeCountry or something. And in your query you would reference $excludeCountry.value. Then in the value of your template variable you would hardcode the full query -@geo.country:Australia. Which will then just be injected directly into the query with no syntax issues.

That's not a great experience though. If I needed to do this for some reason and couldn't just hardcode my exclusion without dealing with a variable, I'd probably make a saved view with that query since it's annoying to type out.


I'll also mention a good solution that is more scalable is to include an isEmployee tag on your RUM data. That's what our company does. So you can add a Global Context to all your sessions that labels whether that session is from an employee or not, and all your queries will be much simpler in the future.

Related