-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQ] Value of attribute deployment.environment is not being sent to app insights #35487
Comments
Ideally I would like to have the exporter library passing this value in the map of customDimensions in app insights |
Thank you for your feedback. This has been routed to the support team for assistance. |
@nicolaslattuada Thanks for reaching out to us and reporting this issue. The below sample code, creates an instance of AzureMonitorTraceExporter and passes it to AddAzureMonitorTraceExporter() method to configure and build a TracerProvider. The AzureMonitorTraceExporter is used to export telemetry data to Azure Monitor. You can configure it with the AzureMonitorExporterOptions object to specify the connection string, export interval, metric namespace, and other options. The Sdk.CreateTracerProviderBuilder() method returns a TracerProviderBuilder object that allows you to configure and build a TracerProvider. You can use it to add sources, instrumentation, exporters, and other components to the TracerProvider. In this example, the "deployment.environment" attribute is set using the SetTag method of the Activity object. This will ensure that the attribute is included in the telemetry data sent to App Insights through the Azure Monitor Trace Exporter.
|
Hi @nicolaslattuada. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
hi @navba-MSFT |
@nicolaslattuada Thanks for getting back. You can configure global tags using the ResourceBuilder object. The ResourceBuilder allows you to create a Resource object that represents the entity producing telemetry data. You can add attributes to the Resource object to represent global tags that apply to all telemetry data produced by the entity. Here's an example of how to create a Resource object with global tags. Hope this answers. |
Hi @nicolaslattuada. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
yes, this is what we are doing, but my point is the values we set in attributes are not being saved in app insights. |
And I think this should be added to the AzureMonitorMetricExporter library |
@nicolaslattuada Thanks for clarifying the ask. I am adding the Service team to look into this further. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cijothomas @reyang @rajkumar-rangaraj @TimothyMothra @vishweshbankwar. |
@cijothomas @reyang @rajkumar-rangaraj @TimothyMothra @vishweshbankwar Could you please look into this once you get a chance ? Thanks in advance. |
Hi ! any update on this? |
hi @cakescience ! |
Just submitted PR #36027 to hopefully address this issue. |
@navba-MSFT where are we at with this? The PR from May 4th is abandoned and closed, can we get an official update so that the Azure Monitor Exporter for .NET sends Resource attributes correctly? |
This is on our backlog. |
My current workaround is to use a custom Processor.
|
The workaround above didn't really work for me (on net7, OpenTelemetry 1.6.0) but this one did:
and then
|
@TimothyMothra Are there any news? It's a pity that custom attributes are getting lost |
No update. The bulk of our feedback has been regarding Resource Attributes. We're still discussing this internally to solve it for all languages. |
Any update on this? we can get around with the processor with log and trace, but there is no such way in metrics. |
I'm consolidating all issues regarding exporting custom Resource Attributes into another issue to help with tracking. #46020 |
Library name and version
Azure.Monitor.OpenTelemetry.Exporter version 1.0.0-beta.9
Query/Question
Hello
We use open telemetry with app insights, and we would like to use the deployment.environment property in order to discriminate between our environments, and not mix metrics reported by production and test environments.
We use the following code in open telemetry:
But unfortunately in the app insights customMetrics table we cannot find this value anywhere.
Please can you advise on what would be the recommended approach in that case?
Environment
No response
The text was updated successfully, but these errors were encountered: