@osfactory/otel-hook 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/runtime.js CHANGED
@@ -2027,6 +2027,7 @@ var createProviderRegistry = (adapters) => {
2027
2027
  errors
2028
2028
  };
2029
2029
  }
2030
+ const nearMisses = [];
2030
2031
  for (const adapter of frozen) {
2031
2032
  let detection;
2032
2033
  try {
@@ -2036,6 +2037,10 @@ var createProviderRegistry = (adapters) => {
2036
2037
  continue;
2037
2038
  }
2038
2039
  if (detection.confidence === "none") {
2040
+ for (const reason of detection.reasons) {
2041
+ const prefixed = `${adapter.id}: ${reason}`;
2042
+ nearMisses.push(prefixed.length <= 160 ? prefixed : `${prefixed.slice(0, 159)}\u2026`);
2043
+ }
2039
2044
  continue;
2040
2045
  }
2041
2046
  if (detection.providerId !== adapter.id) {
@@ -2055,7 +2060,7 @@ var createProviderRegistry = (adapters) => {
2055
2060
  return {
2056
2061
  status: "unknown",
2057
2062
  reason: "no-candidates",
2058
- detection: unknownDetection(),
2063
+ detection: unknownDetection(nearMisses.length === 0 ? void 0 : nearMisses.slice(0, 8)),
2059
2064
  candidates,
2060
2065
  errors
2061
2066
  };