bitfab 0.13.7 → 0.13.8

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/index.cjs CHANGED
@@ -44,7 +44,7 @@ var __version__;
44
44
  var init_version_generated = __esm({
45
45
  "src/version.generated.ts"() {
46
46
  "use strict";
47
- __version__ = "0.13.7";
47
+ __version__ = "0.13.8";
48
48
  }
49
49
  });
50
50
 
@@ -151,7 +151,9 @@ var init_http = __esm({
151
151
  )
152
152
  ),
153
153
  rawSpan: {},
154
- errors: [{ step: "json_serialize", error: serializationError }]
154
+ errors: [
155
+ { source: "sdk", step: "json_serialize", error: serializationError }
156
+ ]
155
157
  });
156
158
  }
157
159
  try {
@@ -2177,6 +2179,7 @@ var BitfabOpenAITracingProcessor = class {
2177
2179
  const jsonResult = span.toJSON();
2178
2180
  if (typeof jsonResult !== "object" || jsonResult === null) {
2179
2181
  errors.push({
2182
+ source: "sdk",
2180
2183
  step: "span.toJSON()",
2181
2184
  error: `Returned unexpected type: ${typeof jsonResult}`
2182
2185
  });
@@ -2186,6 +2189,7 @@ var BitfabOpenAITracingProcessor = class {
2186
2189
  }
2187
2190
  } catch (error) {
2188
2191
  errors.push({
2192
+ source: "sdk",
2189
2193
  step: "span.toJSON()",
2190
2194
  error: error instanceof Error ? error.message : String(error)
2191
2195
  });
@@ -2205,6 +2209,7 @@ var BitfabOpenAITracingProcessor = class {
2205
2209
  spanData.input = span.spanData?._input || [];
2206
2210
  } catch (error) {
2207
2211
  errors.push({
2212
+ source: "sdk",
2208
2213
  step: "access_input",
2209
2214
  error: error instanceof Error ? error.message : String(error)
2210
2215
  });
@@ -2213,6 +2218,7 @@ var BitfabOpenAITracingProcessor = class {
2213
2218
  spanData.response = span.spanData?._response || null;
2214
2219
  } catch (error) {
2215
2220
  errors.push({
2221
+ source: "sdk",
2216
2222
  step: "access_response",
2217
2223
  error: error instanceof Error ? error.message : String(error)
2218
2224
  });
@@ -3141,7 +3147,10 @@ var Bitfab = class {
3141
3147
  ...params.functionName !== void 0 && {
3142
3148
  function_name: params.functionName
3143
3149
  },
3144
- ...params.error !== void 0 && { error: params.error },
3150
+ ...params.error !== void 0 && {
3151
+ error: params.error,
3152
+ error_source: "code"
3153
+ },
3145
3154
  ...params.contexts && params.contexts.length > 0 && {
3146
3155
  contexts: params.contexts
3147
3156
  },