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

[@azure/monitor-opentelemetry-exporter] Resource metrics exporter doesn't use the right environment variable #32653

Open
1 of 6 tasks
matteo-ladrat-Legrand opened this issue Jan 22, 2025 · 0 comments
Assignees
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

Comments

@matteo-ladrat-Legrand
Copy link

  • Package Name: @azure/monitor-opentelemetry-exporter
  • Package Version: 1.0.0-beta.27
  • Operating system: Darwin 24.2.0
  • nodejs
    • version: v18.20.4
  • browser
    • name/version:
  • typescript
    • version:
  • Is the bug related to documentation in

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 to true if we want to disable metrics related to the ressource. However, in the code, the method rely on ENV_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 have process.env[ENV_OPENTELEMETRY_RESOURCE_METRIC_DISABLED] to use the correct environment variable name

To Reproduce
N/A

Expected behavior
The method should rely on APPLICATIONINSIGHTS_OPENTELEMETRY_RESOURCE_METRIC_DISABLED environment variables instead of ENV_OPENTELEMETRY_RESOURCE_METRIC_DISABLED

Screenshots
N/A

Additional context
N/A

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 22, 2025
@JacksonWeber JacksonWeber self-assigned this Jan 22, 2025
@jeremymeng jeremymeng added Client This issue points to a problem in the data-plane of the library. Monitor - Exporter Monitor OpenTelemetry Exporter labels Jan 23, 2025
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants