A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/open-telemetry/opentelemetry-js/issues/5691 below:

`export const enum SemconvStability` from `@opentelemetry/instrumentation` is problematic · Issue #5691 · open-telemetry/opentelemetry-js · GitHub

We recently exported a const enum: export const enum SemconvStability from #5684, released in @opentelemetry/instrumentation@0.201.0. From a quick look, there are no other const enum exports from packages in this repo.

TIL exporting a const enum from a package is problematic for some usages of the package. https://ncjamieson.com/dont-export-const-enums/ explains the issue. Some tooling will compile TS modules one file at a time in isolation. In those cases, a const enum reference, e.g. SemconvStability.OLD, cannot be resolved. One such tooling example is ts-node being used by mocha for testing in opentelemetry-js.git and opentelemetry-js-contrib.git. I gather that this was not an issue for usage of SemconvStability in the same repo (e.g. in instr-http, instr-xhr, instr-fetch), because it is a monorepo where the dependencies are symlinks to the source dir.

We hit the error in this PR, the first one in opentelemetry-js-contrib to attempt to use SemconvStability: open-telemetry/opentelemetry-js-contrib#2671 (comment)

To fix this:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4