@effect/opentelemetry 0.15.0 → 0.16.0

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.
@@ -61,7 +61,7 @@ class OtelSpan {
61
61
  context: makeSpanContext(link.span),
62
62
  attributes: link.attributes
63
63
  })) : undefined
64
- }, parent._tag === "Some" ? populateContext(active, parent.value, context) : active);
64
+ }, parent._tag === "Some" ? populateContext(active, parent.value, context) : OtelApi__namespace.trace.deleteSpan(active));
65
65
  const spanContext = this.span.spanContext();
66
66
  this.spanId = spanContext.spanId;
67
67
  this.traceId = spanContext.traceId;
@@ -61,7 +61,7 @@ class OtelSpan {
61
61
  context: makeSpanContext(link.span),
62
62
  attributes: link.attributes
63
63
  })) : undefined
64
- }, parent._tag === "Some" ? populateContext(active, parent.value, context) : active);
64
+ }, parent._tag === "Some" ? populateContext(active, parent.value, context) : OtelApi__namespace.trace.deleteSpan(active));
65
65
  const spanContext = this.span.spanContext();
66
66
  this.spanId = spanContext.spanId;
67
67
  this.traceId = spanContext.traceId;
@@ -26,7 +26,7 @@ class OtelSpan {
26
26
  context: makeSpanContext(link.span),
27
27
  attributes: link.attributes
28
28
  })) : undefined
29
- }, parent._tag === "Some" ? populateContext(active, parent.value, context) : active);
29
+ }, parent._tag === "Some" ? populateContext(active, parent.value, context) : OtelApi.trace.deleteSpan(active));
30
30
  const spanContext = this.span.spanContext();
31
31
  this.spanId = spanContext.spanId;
32
32
  this.traceId = spanContext.traceId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/opentelemetry",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@opentelemetry/api": "^1.4",
52
- "effect": "2.0.0-next.45"
52
+ "effect": "2.0.0-next.46"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@babel/core": "^7.23.0",
@@ -75,7 +75,7 @@
75
75
  "@vitest/expect": "^0.34.6",
76
76
  "babel-plugin-annotate-pure-calls": "^0.4.0",
77
77
  "concurrently": "^8.2.1",
78
- "effect": "2.0.0-next.45",
78
+ "effect": "2.0.0-next.46",
79
79
  "eslint": "^8.50.0",
80
80
  "eslint-import-resolver-typescript": "^3.6.1",
81
81
  "eslint-plugin-codegen": "0.17.0",
@@ -86,7 +86,7 @@
86
86
  "madge": "^6.1.0",
87
87
  "ts-node": "^10.9.1",
88
88
  "typescript": "^5.2.2",
89
- "vite": "^4.4.10",
89
+ "vite": "^4.4.11",
90
90
  "vitest": "0.34.6"
91
91
  },
92
92
  "exports": {
@@ -31,15 +31,21 @@ export class OtelSpan implements Tracer.Span {
31
31
  startTime: bigint
32
32
  ) {
33
33
  const active = contextApi.active()
34
- this.span = tracer.startSpan(name, {
35
- startTime: nanosToHrTime(startTime),
36
- links: links.length > 0
37
- ? links.map((link) => ({
38
- context: makeSpanContext(link.span),
39
- attributes: link.attributes
40
- }))
41
- : undefined
42
- }, parent._tag === "Some" ? populateContext(active, parent.value, context) : active)
34
+ this.span = tracer.startSpan(
35
+ name,
36
+ {
37
+ startTime: nanosToHrTime(startTime),
38
+ links: links.length > 0
39
+ ? links.map((link) => ({
40
+ context: makeSpanContext(link.span),
41
+ attributes: link.attributes
42
+ }))
43
+ : undefined
44
+ },
45
+ parent._tag === "Some"
46
+ ? populateContext(active, parent.value, context)
47
+ : OtelApi.trace.deleteSpan(active)
48
+ )
43
49
  const spanContext = this.span.spanContext()
44
50
  this.spanId = spanContext.spanId
45
51
  this.traceId = spanContext.traceId