[@azure/monitor-opentelemetry-exporter] Resource metrics exporter doesn't use the right environment variable #32653
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Monitor - Exporter
Monitor OpenTelemetry Exporter
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
The method
shouldCreateResourceMetric
(code) doesn't follow the implementation in other SDK due to a typo in the environment variable used.Based on the other sdk, we should set the environment variable
APPLICATIONINSIGHTS_OPENTELEMETRY_RESOURCE_METRIC_DISABLED
totrue
if we want to disable metrics related to the ressource. However, in the code, the method rely onENV_OPENTELEMETRY_RESOURCE_METRIC_DISABLED
which is the name of the constant defined here.Imo, instead of
process.env.ENV_OPENTELEMETRY_RESOURCE_METRIC_DISABLED
, we should haveprocess.env[ENV_OPENTELEMETRY_RESOURCE_METRIC_DISABLED]
to use the correct environment variable nameTo Reproduce
N/A
Expected behavior
The method should rely on
APPLICATIONINSIGHTS_OPENTELEMETRY_RESOURCE_METRIC_DISABLED
environment variables instead ofENV_OPENTELEMETRY_RESOURCE_METRIC_DISABLED
Screenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: