Skip to content
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

Roles for Multi-component applications does not work in 3.x #1352

Open
bertybot opened this issue Jun 28, 2024 · 5 comments
Open

Roles for Multi-component applications does not work in 3.x #1352

bertybot opened this issue Jun 28, 2024 · 5 comments

Comments

@bertybot
Copy link

Hey I have an existing application that was following the docs mentioned here to define a roleName for my node application so that it would show up in the application map. As of version 3.x this no longer works, and my application shows up in the application map as unkown_service:node downgrading to version 2.9.5 fixes this issue and the name shows up correctly. Is there any recommendations to fix this issue?

@JacksonWeber
Copy link
Contributor

Hi @bertybot it would be possible to set these values in version 3.X of the SDK currently, but you'd need to take advantage of OpenTelemetry resource attributes to do so before, which is documented here in the Azure Monitor OpenTelemetry which version 3.X of the Application Insights SDK is built on.

I'd like to add support for setting roleName in the same manner as the 2.X SDK, I can update this thread when that support arrives.

@bertybot
Copy link
Author

bertybot commented Jul 2, 2024

Hi @bertybot it would be possible to set these values in version 3.X of the SDK currently, but you'd need to take advantage of OpenTelemetry resource attributes to do so before, which is documented here in the Azure Monitor OpenTelemetry which version 3.X of the Application Insights SDK is built on.

I'd like to add support for setting roleName in the same manner as the 2.X SDK, I can update this thread when that support arrives.

Do you have an example using this library? The Telemetry client only takes in a string with no way to send resources. I could just use AzureMonitor directly but, then I would have no reason to use this package. Really documentation on best practices of using this package would be much appreciated.

@JacksonWeber
Copy link
Contributor

@bertybot Apologies, the above is intended as a workaround using another package if you're in need of this functionality immediately and wanted to use the latest package. If you can wait for support on this package and don't want to move over to the Azure Monitor OpenTelemetry distro, then that's the advised path.

@JacksonWeber
Copy link
Contributor

@bertybot You could also use the OpenTelemetry resource attributes environment variable, OTEL_RESOURCE_ATTRIBUTES to modify these kinds of resource attributes. While your cloud role name will be set to that string in the event of running locally, it should be set correctly in an Azure environment. Can I get a better idea of your use-case for this manual setting of this value?

@radoslavirha
Copy link

radoslavirha commented Nov 5, 2024

Hello, I found this issue when I was investigating the same problem. Is there any ETA for this feature? Support for application version would be great too. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants