Your AdonisJS ecosystem, in the loop.
All insights
breaking changeBreaking changeAction required

AdonisJS Otel 2.0.0 Release

· Developer impact : high

The AdonisJS Otel package has been released in version 2.0.0, upgrading to OpenTelemetry JS SDK 3 and introducing several breaking changes including updated instrumentation conventions, new Node.js version requirements, and API changes.

What this means for your code

Developers must upgrade to Node.js 22.15.0 or later and ensure their applications use @opentelemetry/api 1.10 without mixing OpenTelemetry SDK 2 packages. They need to migrate HTTP and database instrumentation to stable-only conventions with new metric names and units. The API for spanProcessor, metricReader, and logRecordProcessor options has changed from singular to plural arrays, and span processors now accept an options object. Additionally, environment variables for span processors have changed, and resources now include new os.* attributes. These changes require code updates and testing to maintain compatibility.

  • Upgrade Node.js to version 22.15.0 or later.
  • Use @opentelemetry/api version 1.10 and avoid mixing with OpenTelemetry SDK 2 packages.
  • Migrate HTTP and database instrumentation to stable-only conventions with new metric names and units (seconds).
  • Update code to use plural arrays for spanProcessor, metricReader, and logRecordProcessor options instead of singular.
  • Modify span processor instantiation to accept an options object.
  • Remove reliance on OTEL_BSP_* environment variables for span processors.
  • Adapt to new resource attributes including os.* fields.
  • Test application thoroughly to ensure compatibility with OpenTelemetry JS SDK 3 and the new Otel package version.

Original sources

AI-generated analysis based on the linked sources. Check the original documentation before changing your application.

Independent ecosystem watch. Sources linked in every insight.Built with AdonisJS · AI-assisted summariesBy Jérémy Chaufourier · chaufourier.fr