@blaxel/core 0.2.4-dev.71 → 0.2.4-dev.72

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.
@@ -57,6 +57,6 @@ export declare const telemetryRegistry: TelemetryRegistry;
57
57
  * Create a span with the registered provider
58
58
  */
59
59
  export declare function startSpan(name: string, options?: BlaxelSpanOptions): BlaxelSpan;
60
- export declare function withSpan<T>(name: string, fn: () => T, options?: BlaxelSpanOptions): T;
60
+ export declare function withSpan<T>(name: string, fn: () => Promise<T>, options?: BlaxelSpanOptions): Promise<T>;
61
61
  export declare function flush(): Promise<void>;
62
62
  export {};
@@ -62,10 +62,10 @@ exports.telemetryRegistry = TelemetryRegistry.getInstance();
62
62
  function startSpan(name, options) {
63
63
  return exports.telemetryRegistry.getProvider().startSpan(name, options);
64
64
  }
65
- function withSpan(name, fn, options) {
65
+ async function withSpan(name, fn, options) {
66
66
  const span = startSpan(name, options);
67
67
  try {
68
- const result = fn();
68
+ const result = await fn();
69
69
  span.end();
70
70
  return result;
71
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaxel/core",
3
- "version": "0.2.4-dev.71",
3
+ "version": "0.2.4-dev.72",
4
4
  "description": "Blaxel Core SDK for TypeScript",
5
5
  "license": "MIT",
6
6
  "author": "Blaxel, INC (https://blaxel.ai)",