@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.
@@ -691,10 +691,15 @@ import {
691
691
  ATTR_GEN_AI_USAGE_REASONING_OUTPUT_TOKENS,
692
692
  ATTR_SESSION_ID
693
693
  } from "@opentelemetry/semantic-conventions/incubating";
694
+
695
+ // src/version.ts
696
+ var VERSION = "0.1.2";
697
+
698
+ // src/telemetry/semconv.ts
694
699
  var SCOPE_NAME = "@osfactory/otel-hook";
695
700
  var DEFAULT_INSTRUMENTATION_SCOPE = Object.freeze({
696
701
  name: SCOPE_NAME,
697
- version: "0.1.0"
702
+ version: VERSION
698
703
  });
699
704
  var ATTR_OTELHOOK_INVOCATION_ID = "otelhook.invocation.id";
700
705
  var ATTR_OTELHOOK_PROVIDER_ID = "otelhook.provider.id";
@@ -3090,6 +3095,7 @@ var createProviderRegistry = (adapters) => {
3090
3095
  errors
3091
3096
  };
3092
3097
  }
3098
+ const nearMisses = [];
3093
3099
  for (const adapter of frozen) {
3094
3100
  let detection;
3095
3101
  try {
@@ -3099,6 +3105,10 @@ var createProviderRegistry = (adapters) => {
3099
3105
  continue;
3100
3106
  }
3101
3107
  if (detection.confidence === "none") {
3108
+ for (const reason of detection.reasons) {
3109
+ const prefixed = `${adapter.id}: ${reason}`;
3110
+ nearMisses.push(prefixed.length <= 160 ? prefixed : `${prefixed.slice(0, 159)}\u2026`);
3111
+ }
3102
3112
  continue;
3103
3113
  }
3104
3114
  if (detection.providerId !== adapter.id) {
@@ -3118,7 +3128,7 @@ var createProviderRegistry = (adapters) => {
3118
3128
  return {
3119
3129
  status: "unknown",
3120
3130
  reason: "no-candidates",
3121
- detection: unknownDetection(),
3131
+ detection: unknownDetection(nearMisses.length === 0 ? void 0 : nearMisses.slice(0, 8)),
3122
3132
  candidates,
3123
3133
  errors
3124
3134
  };