StackdriverStatsExporter: k8s namespace and container name missing
See original GitHub issueWhat version of OpenCensus are you using?
0.19.1
What JVM are you using (java -version
)?
openjdk version “1.8.0_181” OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
What did you do?
I’m using StackdriverStatsExporter.createAndRegister()
in an application running on GKE (1.10.11-gke.1).
What did you expect to see?
I expect all the labels for k8s_container
to be populated, see
https://cloud.google.com/monitoring/api/resources#tag_k8s_container
What did you see instead?
The following labels are empty:
namespace_name
container_name
This makes it very hard to differentiate metrics between multiple applications running within the same GCP project.
Is there a workaround for this?
It would help a lot if it would be possible to set global tags which are appended to all metrics automatically.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Kubernetes best practices: Specifying Namespaces in YAML
Managing your active Namespace Out of the box, your active namespace is the “default” namespace. Unless you specify a Namespace in the YAML, ......
Read more >Namespaces Walkthrough - Kubernetes
We have created a deployment whose replica size is 2 that is running the pod called snowflake with a basic container that serves...
Read more >Kubernetes Log collection - Datadog Docs
The pointerdir is used to store a file with a pointer to all the containers that the Agent is collecting logs from. This...
Read more >Projects and Kubernetes Namespaces with Rancher
From the Name combo box, search for a user or group that you want to assign project access. Note: You can only search...
Read more >Troubleshoot Container insights - Azure Monitor
When you configure monitoring of your Azure Kubernetes Service (AKS) ... --namespace=kube-system NAME DESIRED CURRENT READY UP-TO-DATE ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’re now using the following code to get the
MonitoredResource
:We set the namespace via downward API and just set the container name to the service name within the application. This works fine for our needs right now.
Thanks for your help. We can close this issue.
Thanks @mwuertinger for confirmation. Closing this for now, feel free to reopen if you have any follow-up questions.