ApplicationInsights-node.js icon indicating copy to clipboard operation
ApplicationInsights-node.js copied to clipboard

Setting cloud role name in v3?

Open DevRCRun opened this issue 1 year ago • 1 comments

Under 2.x in CJS we had

const appInsights = require('applicationinsights') ... appInsights.defaultClient.context.tags[appInsights.defaultClient.context.keys.cloudRole] = 'our-name-here'

What's the equivalent in 3.x please?

I didn't immediately spot this in the migration guide, apologies if I have just missed it

DevRCRun avatar Aug 01 '24 14:08 DevRCRun

This has been addressed here: https://github.com/microsoft/ApplicationInsights-node.js/issues/1352. I can address this in documentation to make it clear that this support is not here yet.

JacksonWeber avatar Aug 07 '24 20:08 JacksonWeber

@DevRCRun Does using the OTEL_RESOURCE_ATTRIBUTES environment variable work for your use case?

JacksonWeber avatar Dec 31 '24 00:12 JacksonWeber

Closing as the issue has been previously addressed.

JacksonWeber avatar Mar 26 '25 21:03 JacksonWeber