@siglo/opentelemetry 1.0.0 → 1.0.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.
- package/README.md +3 -4
- package/dist/instrument.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ The OpenTelemetry integration creates an end-to-end distributed span hierarchy c
|
|
|
10
10
|
|
|
11
11
|
```mermaid
|
|
12
12
|
flowchart TD
|
|
13
|
-
Req["Incoming HTTP / Kafka / SQS Request<br/>(with W3C traceparent)"] -->|extractTraceContext()| WFSpan["Span: workflow:CheckoutPipeline<br/>• siglo.workflow.name = 'CheckoutPipeline'<br/>• siglo.workflow.version = '2.1.0'<br/>• siglo.stack.id = 'stack_9812_01'<br/>• siglo.namespace = 'ecommerce-us'<br/>• siglo.timeout = 30000"]
|
|
13
|
+
Req["Incoming HTTP / Kafka / SQS Request<br/>(with W3C traceparent)"] -->|"extractTraceContext()"| WFSpan["Span: workflow:CheckoutPipeline<br/>• siglo.workflow.name = 'CheckoutPipeline'<br/>• siglo.workflow.version = '2.1.0'<br/>• siglo.stack.id = 'stack_9812_01'<br/>• siglo.namespace = 'ecommerce-us'<br/>• siglo.timeout = 30000"]
|
|
14
14
|
WFSpan --> Step1["Span: step:validateCart<br/>• siglo.step.name = ...<br/>• siglo.step.attempt = 1<br/>• Status: OK"]
|
|
15
15
|
WFSpan --> Step2["Span: step:chargeCard<br/>• siglo.step.attempt = 1<br/>• (Failure: recordException)"]
|
|
16
16
|
Step2 -->|Retry| Step2Retry["Span: step:chargeCard (retry #2)<br/>• siglo.step.attempt = 2<br/>• Status: OK"]
|
|
@@ -66,7 +66,7 @@ function instrumentWorkflow<TInput = any, TOutput = any>(
|
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
#### Options (`SigloTelemetryOptions`):
|
|
69
|
-
- `tracer` (`Tracer`): Custom OpenTelemetry `Tracer` instance. If omitted, uses `trace.getTracer('@siglo/opentelemetry', '1.0.
|
|
69
|
+
- `tracer` (`Tracer`): Custom OpenTelemetry `Tracer` instance. If omitted, uses `trace.getTracer('@siglo/opentelemetry', '1.0.3')`.
|
|
70
70
|
- `serviceName` (`string`): Tracer service name identifier.
|
|
71
71
|
- `workflowName` (`string`): Override workflow span label.
|
|
72
72
|
- `workflowVersion` (`string`): Workflow version (default: `'1.0.0'`).
|
|
@@ -156,8 +156,7 @@ const chargePayment = Step.create('chargePayment', async (param: any) => {
|
|
|
156
156
|
}
|
|
157
157
|
return { paymentStatus: 'CHARGED', cardLast4: '4242' };
|
|
158
158
|
})
|
|
159
|
-
.
|
|
160
|
-
;
|
|
159
|
+
.onFail({ maxRetries: 2, delay: 100 });
|
|
161
160
|
|
|
162
161
|
const orderWorkflow = flow(validateOrder, chargePayment);
|
|
163
162
|
|
package/dist/instrument.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.instrumentWorkflow = instrumentWorkflow;
|
|
|
7
7
|
const api_1 = require("@opentelemetry/api");
|
|
8
8
|
const attributes_1 = require("./attributes");
|
|
9
9
|
const DEFAULT_TRACER_NAME = '@siglo/opentelemetry';
|
|
10
|
-
const DEFAULT_TRACER_VERSION = '1.0.
|
|
10
|
+
const DEFAULT_TRACER_VERSION = '1.0.3';
|
|
11
11
|
/**
|
|
12
12
|
* Returns an OpenTelemetry tracer based on configuration.
|
|
13
13
|
*/
|