I have a dotnet container which I can't change the source code of running inside a kubernetes cluster as a deployment.
The application is sending its metrics to an otel collector configured in appsettings.json. The collector then gets its metrics scraped into prometheus.
I have multiple instances of this application running in different namespaces all sending their data to the same collector.
How can I add data held within the labels of the different deployments to the metrics that are sent to prometheus.
E.g. I have a label called "tenant" which changes between namespaces, I need this label added to the metric so I can query on it in prometheus. Or if easier if I set the container to have an environment variable set to the label value how can this be sent.
How can this be achieved?