@temporalio/interceptors-opentelemetry 0.14.0 → 0.16.3

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.
@@ -2,7 +2,7 @@ import * as otel from '@opentelemetry/api';
2
2
  import { Resource } from '@opentelemetry/resources';
3
3
  import { SpanExporter } from '@opentelemetry/sdk-trace-base';
4
4
  import { Context as ActivityContext } from '@temporalio/activity';
5
- import { ActivityExecuteInput, ActivityInboundCallsInterceptor, DataConverter, InjectedDependency, Next } from '@temporalio/worker';
5
+ import { ActivityExecuteInput, ActivityInboundCallsInterceptor, DataConverter, InjectedSink, Next } from '@temporalio/worker';
6
6
  import { OpenTelemetryWorkflowExporter } from '../workflow';
7
7
  export interface InterceptorOptions {
8
8
  readonly tracer?: otel.Tracer;
@@ -22,6 +22,6 @@ export declare class OpenTelemetryActivityInboundInterceptor implements Activity
22
22
  execute(input: ActivityExecuteInput, next: Next<ActivityInboundCallsInterceptor, 'execute'>): Promise<unknown>;
23
23
  }
24
24
  /**
25
- * Takes an opentelemetry SpanExporter and turns it into an injected Workflow span exporter dependency
25
+ * Takes an opentelemetry SpanExporter and turns it into an injected Workflow span exporter sink
26
26
  */
27
- export declare function makeWorkflowExporter(exporter: SpanExporter, resource: Resource): InjectedDependency<OpenTelemetryWorkflowExporter>;
27
+ export declare function makeWorkflowExporter(exporter: SpanExporter, resource: Resource): InjectedSink<OpenTelemetryWorkflowExporter>;
@@ -45,7 +45,7 @@ class OpenTelemetryActivityInboundInterceptor {
45
45
  }
46
46
  exports.OpenTelemetryActivityInboundInterceptor = OpenTelemetryActivityInboundInterceptor;
47
47
  /**
48
- * Takes an opentelemetry SpanExporter and turns it into an injected Workflow span exporter dependency
48
+ * Takes an opentelemetry SpanExporter and turns it into an injected Workflow span exporter sink
49
49
  */
50
50
  function makeWorkflowExporter(exporter, resource) {
51
51
  return {
@@ -1,7 +1,7 @@
1
+ /// <reference types="node" />
1
2
  import * as otel from '@opentelemetry/api';
2
- import { AsyncLocalStorage } from '@temporalio/workflow';
3
3
  export declare class ContextManager implements otel.ContextManager {
4
- protected storage: AsyncLocalStorage<otel.Context>;
4
+ protected storage: import("async_hooks").AsyncLocalStorage<otel.Context>;
5
5
  active(): otel.Context;
6
6
  bind<T>(context: otel.Context, target: T): T;
7
7
  enable(): this;
@@ -54,6 +54,7 @@ class ContextManager {
54
54
  return this;
55
55
  }
56
56
  disable() {
57
+ this.storage.disable();
57
58
  return this;
58
59
  }
59
60
  with(context, fn, thisArg, ...args) {
@@ -1 +1 @@
1
- {"version":3,"file":"context-manager.js","sourceRoot":"","sources":["../../src/workflow/context-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yDAA2C;AAC3C,mDAAyD;AAEzD,MAAa,cAAc;IAA3B;QACY,YAAO,GAAG,IAAI,4BAAiB,EAAgB,CAAC;IA8C5D,CAAC;IA5CC,MAAM;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;IACtD,CAAC;IAED,IAAI,CAAI,OAAqB,EAAE,MAAS;QACtC,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;YAChC,MAAM,IAAI,SAAS,CAAC,2CAA2C,OAAO,MAAM,EAAE,CAAC,CAAC;SACjF;QAED,8JAA8J;QAC9J,MAAM,cAAc,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE;YAC5C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QAC5D,CAAC,CAAC;QACF,MAAM,CAAC,cAAc,CAAC,cAAc,EAAE,QAAQ,EAAE;YAC9C,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,MAAM,CAAC,MAAM;SACrB,CAAC,CAAC;QACH;;;WAGG;QACH,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jB,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,MAAM,CAAC,MAAM;SACrB,CAAC,CAAC;QACH;;;WAGG;QACH,8DAA8D;QAC9D,OAAO,cAAqB,CAAC;IAC/B,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CACF,OAAqB,EACrB,EAAK,EACL,OAA8B,EAC9B,GAAG,IAAO;QAEV,MAAM,EAAE,GAAG,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;IAChD,CAAC;CACF;AAhDD,wCAgDC"}
@@ -1,7 +1,7 @@
1
1
  import * as otel from '@opentelemetry/api';
2
2
  import * as tracing from '@opentelemetry/sdk-trace-base';
3
3
  import { InstrumentationLibrary } from '@opentelemetry/core';
4
- import { ExternalDependency, ExternalDependencies } from '@temporalio/workflow';
4
+ import { Sink, Sinks } from '@temporalio/workflow';
5
5
  /**
6
6
  * Serializable version of the opentelemetry Span for cross isolate copying
7
7
  */
@@ -20,13 +20,13 @@ export interface SerializableSpan {
20
20
  readonly ended: boolean;
21
21
  readonly instrumentationLibrary: InstrumentationLibrary;
22
22
  }
23
- export interface OpenTelemetryWorkflowExporter extends ExternalDependency {
23
+ export interface OpenTelemetryWorkflowExporter extends Sink {
24
24
  export(span: SerializableSpan[]): void;
25
25
  }
26
26
  /**
27
27
  * Required external dependencies for Workflow interceptor to export spans
28
28
  */
29
- export interface OpenTelemetryDependencies extends ExternalDependencies {
29
+ export interface OpenTelemetrySinks extends Sinks {
30
30
  exporter: OpenTelemetryWorkflowExporter;
31
31
  }
32
32
  export declare enum SpanName {
@@ -1,6 +1,6 @@
1
1
  import './runtime';
2
2
  import * as otel from '@opentelemetry/api';
3
- import { ActivityInput, Next, StartChildWorkflowExecutionInput, WorkflowInboundCallsInterceptor, WorkflowOutboundCallsInterceptor, WorkflowExecuteInput, ContinueAsNewInput } from '@temporalio/workflow';
3
+ import { ActivityInput, DisposeInput, Next, StartChildWorkflowExecutionInput, WorkflowInboundCallsInterceptor, WorkflowOutboundCallsInterceptor, WorkflowExecuteInput, ContinueAsNewInput, WorkflowInternalsInterceptor } from '@temporalio/workflow';
4
4
  export * from './definitions';
5
5
  /**
6
6
  * Intercepts calls to run a Workflow
@@ -23,3 +23,6 @@ export declare class OpenTelemetryOutboundInterceptor implements WorkflowOutboun
23
23
  startChildWorkflowExecution(input: StartChildWorkflowExecutionInput, next: Next<WorkflowOutboundCallsInterceptor, 'startChildWorkflowExecution'>): Promise<[Promise<string>, Promise<unknown>]>;
24
24
  continueAsNew(input: ContinueAsNewInput, next: Next<WorkflowOutboundCallsInterceptor, 'continueAsNew'>): Promise<never>;
25
25
  }
26
+ export declare class OpenTelemetryInternalsInterceptor implements WorkflowInternalsInterceptor {
27
+ dispose(input: DisposeInput, next: Next<WorkflowInternalsInterceptor, 'dispose'>): Promise<void>;
28
+ }
@@ -22,7 +22,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
22
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.OpenTelemetryOutboundInterceptor = exports.OpenTelemetryInboundInterceptor = void 0;
25
+ exports.OpenTelemetryInternalsInterceptor = exports.OpenTelemetryOutboundInterceptor = exports.OpenTelemetryInboundInterceptor = void 0;
26
26
  require("./runtime"); // Patch the Workflow isolate runtime for opentelemetry
27
27
  const workflow_1 = require("@temporalio/workflow");
28
28
  const otel_1 = require("@temporalio/common/lib/otel");
@@ -33,11 +33,15 @@ const tracing = __importStar(require("@opentelemetry/sdk-trace-base"));
33
33
  const instrumentation_1 = require("../instrumentation");
34
34
  __exportStar(require("./definitions"), exports);
35
35
  let tracer = undefined;
36
+ let contextManager = undefined;
36
37
  function getTracer() {
38
+ if (contextManager === undefined) {
39
+ contextManager = new context_manager_1.ContextManager();
40
+ }
37
41
  if (tracer === undefined) {
38
42
  const provider = new tracing.BasicTracerProvider();
39
43
  provider.addSpanProcessor(new tracing.SimpleSpanProcessor(new span_exporter_1.SpanExporter()));
40
- provider.register({ contextManager: new context_manager_1.ContextManager() });
44
+ provider.register({ contextManager });
41
45
  tracer = provider.getTracer('@temporalio/interceptor-workflow');
42
46
  }
43
47
  return tracer;
@@ -97,4 +101,13 @@ class OpenTelemetryOutboundInterceptor {
97
101
  }
98
102
  }
99
103
  exports.OpenTelemetryOutboundInterceptor = OpenTelemetryOutboundInterceptor;
104
+ class OpenTelemetryInternalsInterceptor {
105
+ async dispose(input, next) {
106
+ if (contextManager !== undefined) {
107
+ contextManager.disable();
108
+ }
109
+ await next(input);
110
+ }
111
+ }
112
+ exports.OpenTelemetryInternalsInterceptor = OpenTelemetryInternalsInterceptor;
100
113
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAmB,CAAC,uDAAuD;AAE3E,mDAS8B;AAC9B,sDAA4F;AAC5F,uDAAmD;AACnD,mDAA+C;AAC/C,+CAAyD;AACzD,uEAAyD;AACzD,wDAAgD;AAEhD,gDAA8B;AAE9B,IAAI,MAAM,GAA4B,SAAS,CAAC;AAEhD,SAAS,SAAS;IAChB,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;QACnD,QAAQ,CAAC,gBAAgB,CAAC,IAAI,OAAO,CAAC,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@ Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.SpanExporter = void 0;
23
23
  const core_1 = require("@opentelemetry/core");
24
24
  const wf = __importStar(require("@temporalio/workflow"));
25
- const { exporter } = wf.dependencies();
25
+ const { exporter } = wf.proxySinks();
26
26
  class SpanExporter {
27
27
  export(spans, resultCallback) {
28
28
  exporter.export(spans.map((span) => this.makeSerializable(span)));
@@ -1 +1 @@
1
- {"version":3,"file":"span-exporter.js","sourceRoot":"","sources":["../../src/workflow/span-exporter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,8CAAqE;AACrE,yDAA2C;AAG3C,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,EAA6B,CAAC;AAElE,MAAa,YAAY;IAChB,MAAM,CAAC,KAA6B,EAAE,cAA8C;QACzF,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClE,cAAc,CAAC,EAAE,IAAI,EAAE,uBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;IAEM,KAAK,CAAC,QAAQ;QACnB,uBAAuB;IACzB,CAAC;IAEM,gBAAgB,CAAC,IAA0B;QAChD,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;YAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,Q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C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temporalio/interceptors-opentelemetry",
3
- "version": "0.14.0",
3
+ "version": "0.16.3",
4
4
  "description": "Temporal.io SDK interceptors bundle for tracing with opentelemetry",
5
5
  "main": "lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -18,10 +18,10 @@
18
18
  "@opentelemetry/core": "^1.0.0",
19
19
  "@opentelemetry/resources": "^1.0.0",
20
20
  "@opentelemetry/sdk-trace-base": "^1.0.0",
21
- "@temporalio/client": "^0.14.0",
22
- "@temporalio/common": "^0.14.0",
23
- "@temporalio/worker": "^0.14.0",
24
- "@temporalio/workflow": "^0.14.0"
21
+ "@temporalio/client": "^0.16.3",
22
+ "@temporalio/common": "^0.16.0",
23
+ "@temporalio/worker": "^0.16.3",
24
+ "@temporalio/workflow": "^0.16.3"
25
25
  },
26
26
  "bugs": {
27
27
  "url": "https://github.com/temporalio/sdk-typescript/issues"
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "fd09cf4d3c996c96bf604d2e318165cfbad18a4a"
36
+ "gitHead": "af54140a4da7e191c06627c5e06b92a3fd929bcc"
37
37
  }