Hello! I want to user Services Map view to filter ...
# support
j
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?
s
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.
j
Hi @Srikanth Chekuri 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.
In service map view, UI complains that I do not have any resource attributes to filter.
s
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?
j
@Srikanth Chekuri Yes, traces are enriched because I can filter traces using for example using query
k8s.namespace.name.(string) Equals ("staging")
s
Ok, thanks for the confirmation; this is probably a bug.
I believe at least
deployment.environment
should work, but I am not sure if that helps.
j
Ok. I will create an issue about this to GH.
deployment.environment does not help because UI does not allow me to type anything to text field.
s
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
j
Hmmh. No idea how I can control what attributes Opentelemetry Operator adds to OTEL_RESOURCE_ATTRIBUTES 🙁
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.