#support

Issue with Filtering Data by Namespaces in Services Map View

TLDR Juha faced issues filtering data by namespaces in Services Map view. Srikanth suggested using deployment.environment, but a bug may exist, and an issue was created on GitHub.

Powered by Struct AI
Apr 17, 2023 (8 months ago)
Juha
Photo of md5-f6bbff9abeea1c8430cb80b160f25d8a
Juha
02:55 PM
Hello! I want to user Services Map view to filter data by namespaces. I’m using Opentelemetry operator to autoinstrument my applications (using Instrumentation CRD). But it seems that after autoinstrumentation, there are not compatible attributes added to instrumented pods OTEL_RESOURCE_ATTRIBUTES so I can not filter per namespace. OTEL_RESOURCE_ATTRIBUTES has k8s.namespace.name attribute but according to SigNoz documentation, that is not supported. Suitable attribute should be resource_k8s_cluster_namespace. How to add that to autoinstrumentation?
Apr 18, 2023 (8 months ago)
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
03:29 AM
> OTEL_RESOURCE_ATTRIBUTES has k8s.namespace.name attribute but according to SigNoz documentation, that is not supported
Where is it this mentioned? The k8s.namespace.name is converted to k8s_cluster_namespace for the compatibility reasons and it should be available if you are sending the data.
Apr 20, 2023 (8 months ago)
Juha
Photo of md5-f6bbff9abeea1c8430cb80b160f25d8a
Juha
08:15 AM
Hi Srikanth for example in Logs view I can filter logs using k8s_namespace_name, for example k8s_namespace_name IN (‘staging’)

Same can not be used in Service Map view.
08:16
Juha
08:16 AM
In service map view, UI complains that I do not have any resource attributes to filter.
Image 1 for In service map view, UI complains that I do not have any resource attributes to filter.
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
09:37 AM
The service map data is coming from the traces. It could be possible that for logs you are using automatic collection, which enriches the data but may be missing for traces. Can you confirm if your traces are also enriched with k8s metadata?
Juha
Photo of md5-f6bbff9abeea1c8430cb80b160f25d8a
Juha
10:53 AM
Srikanth Yes, traces are enriched because I can filter traces using for example using query k8s.namespace.name.(string) Equals ("staging")
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
11:16 AM
Ok, thanks for the confirmation; this is probably a bug.
11:16
Srikanth
11:16 AM
I believe at least deployment.environment should work, but I am not sure if that helps.
Juha
Photo of md5-f6bbff9abeea1c8430cb80b160f25d8a
Juha
12:02 PM
Ok. I will create an issue about this to GH.
12:04
Juha
12:04 PM
deployment.environment does not help because UI does not allow me to type anything to text field.
12:17
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
01:31 PM
> deployment.environment does not help because UI does not allow me to type anything to text field.
If you send this as a part of the resource attributes it will show up in the dropdown https://signoz.io/docs/userguide/metrics/#steps-to-add-resource-attributes
Juha
Photo of md5-f6bbff9abeea1c8430cb80b160f25d8a
Juha
01:42 PM
Hmmh. No idea how I can control what attributes Opentelemetry Operator adds to OTEL_RESOURCE_ATTRIBUTES 🙁
03:16
Juha
03:16 PM
Ahaa, now I know how I could add that deployment.environment to OTEL_RESOURCE_ATTRIBUTES. So I can try that, but still this should work with default resource attributes that Opentelemetry Operator sets (k8s.namespace.name, k8s.container.name, k8s.pod.name, k8s.pod.uid, k8s.node.name …) so the issue is valid.

SigNoz Community

Built with ClickHouse as datastore, SigNoz is an open-source APM to help you find issues in your deployed applications & solve them quickly | Knowledge Base powered by Struct.AI

Indexed 1023 threads (61% resolved)

Join Our Community