Skip to content

OTEL Outgoing Dependencies Issue in ESM Environments #12

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

Merged
merged 3 commits into from
Jun 18, 2025

Conversation

swapnil-nagar
Copy link
Contributor

This PR addresses a critical issue reported by a customer where outgoing dependencies were not being correctly instrumented in ESM-based Azure Functions apps.

Key Changes

  • Introduced a new class specifically designed to support ESM modules.

Reason: The existing code path is not compatible with ESM, and this workaround is currently the only approach that resolves the issue for the customer.

  • The implementation is isolated and non-breaking for CommonJS users.

Notes
This ESM-specific class is intended as a temporary solution. Once the upstream @opentelemetry library provides first-class support for ESM, we plan to retire this workaround in the next major release.

Please review the new class and method and share feedback on naming, structure, or messaging as appropriate.

Next Steps

  • After this PR is merged:
  • A new version of the azure-functions-nodejs-opentelemetry package will be published.
  • Sample apps demonstrating this fix will be updated and shared.

@swapnil-nagar swapnil-nagar marked this pull request as ready for review June 12, 2025 17:13
@swapnil-nagar swapnil-nagar requested a review from a team as a code owner June 12, 2025 17:13
@swapnil-nagar swapnil-nagar merged commit ac495ba into main Jun 18, 2025
10 checks passed
@swapnil-nagar swapnil-nagar deleted the swapnil/OtelESMSupport branch June 18, 2025 20:12
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

Successfully merging this pull request may close these issues.

4 participants