We have migrated our logs recently to dynatrace, we have AKS shared clusters where with multiple teams with ingresses where we need to let them see their nginx logs (for their ingresses) but not all the ingresses logs from others teams. On nginx we were able to add additional headers so we have a custom appid in the nginx log json, here is an example of a query I was able to create based on this json:
fetch logs
| filter matchesValue(k8s.cluster.name, “my-cluster”) AND matchesValue(k8s.namespace.name, “nginx-ingress”)
| filter matchesValue(content, “{*”)
and matchesPhrase(content, “\“appid\””)
| filter parse(content, “JSON{STRING:‘appid’}(flat=true)”) == “MYAPPID007”
| sort timestamp desc
| parse content, “JSON:json”
This query will show me the logs from the value we added, is there a way we can let users/teams only seeing specific logs from their custom appid?
I’m looking into segmentation now but I wanted to ask for guidance