@sentry/opentelemetry 7.90.0 → 7.92.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.
- package/cjs/asyncContextStrategy.js.map +1 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/contextManager.js.map +1 -1
- package/cjs/custom/client.js +6 -1
- package/cjs/custom/client.js.map +1 -1
- package/cjs/custom/hub.js.map +1 -1
- package/cjs/custom/hubextensions.js.map +1 -1
- package/cjs/custom/scope.js.map +1 -1
- package/cjs/custom/transaction.js.map +1 -1
- package/cjs/debug-build.js.map +1 -1
- package/cjs/index.js +1 -0
- package/cjs/index.js.map +1 -1
- package/cjs/propagator.js.map +1 -1
- package/cjs/sampler.js.map +1 -1
- package/cjs/semanticAttributes.js.map +1 -1
- package/cjs/setupEventContextTrace.js.map +1 -1
- package/cjs/spanExporter.js +1 -1
- package/cjs/spanExporter.js.map +1 -1
- package/cjs/spanProcessor.js +1 -1
- package/cjs/spanProcessor.js.map +1 -1
- package/cjs/trace.js +35 -30
- package/cjs/trace.js.map +1 -1
- package/cjs/utils/addOriginToSpan.js.map +1 -1
- package/cjs/utils/captureExceptionForTimedEvent.js.map +1 -1
- package/cjs/utils/contextData.js.map +1 -1
- package/cjs/utils/convertOtelTimeToSeconds.js.map +1 -1
- package/cjs/utils/getActiveSpan.js.map +1 -1
- package/cjs/utils/getRequestSpanData.js.map +1 -1
- package/cjs/utils/getSpanKind.js.map +1 -1
- package/cjs/utils/groupSpansWithParents.js.map +1 -1
- package/cjs/utils/isSentryRequest.js.map +1 -1
- package/cjs/utils/mapStatus.js.map +1 -1
- package/cjs/utils/parseSpanDescription.js.map +1 -1
- package/cjs/utils/spanData.js.map +1 -1
- package/cjs/utils/spanTypes.js.map +1 -1
- package/esm/asyncContextStrategy.js.map +1 -1
- package/esm/constants.js.map +1 -1
- package/esm/contextManager.js.map +1 -1
- package/esm/custom/client.js +6 -1
- package/esm/custom/client.js.map +1 -1
- package/esm/custom/hub.js.map +1 -1
- package/esm/custom/hubextensions.js.map +1 -1
- package/esm/custom/scope.js.map +1 -1
- package/esm/custom/transaction.js.map +1 -1
- package/esm/debug-build.js.map +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/propagator.js.map +1 -1
- package/esm/sampler.js.map +1 -1
- package/esm/semanticAttributes.js.map +1 -1
- package/esm/setupEventContextTrace.js.map +1 -1
- package/esm/spanExporter.js +1 -1
- package/esm/spanExporter.js.map +1 -1
- package/esm/spanProcessor.js +1 -1
- package/esm/spanProcessor.js.map +1 -1
- package/esm/trace.js +36 -32
- package/esm/trace.js.map +1 -1
- package/esm/utils/addOriginToSpan.js.map +1 -1
- package/esm/utils/captureExceptionForTimedEvent.js.map +1 -1
- package/esm/utils/contextData.js.map +1 -1
- package/esm/utils/convertOtelTimeToSeconds.js.map +1 -1
- package/esm/utils/getActiveSpan.js.map +1 -1
- package/esm/utils/getRequestSpanData.js.map +1 -1
- package/esm/utils/getSpanKind.js.map +1 -1
- package/esm/utils/groupSpansWithParents.js.map +1 -1
- package/esm/utils/isSentryRequest.js.map +1 -1
- package/esm/utils/mapStatus.js.map +1 -1
- package/esm/utils/parseSpanDescription.js.map +1 -1
- package/esm/utils/spanData.js.map +1 -1
- package/esm/utils/spanTypes.js.map +1 -1
- package/package.json +10 -4
- package/types/custom/client.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/spanExporter.d.ts.map +1 -1
- package/types/trace.d.ts +10 -0
- package/types/trace.d.ts.map +1 -1
- package/types/types.d.ts +4 -1
- package/types/types.d.ts.map +1 -1
- package/types-ts3.8/index.d.ts +1 -1
- package/types-ts3.8/trace.d.ts +10 -0
- package/types-ts3.8/types.d.ts +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spanData.js","sources":["../../../src/utils/spanData.ts"],"sourcesContent":["import type { Span } from '@opentelemetry/api';\nimport type { Hub, Scope, TransactionMetadata } from '@sentry/types';\n\nimport type { AbstractSpan } from '../types';\n\n// We store the parent span, scope & metadata in separate weakmaps, so we can access them for a given span\n// This way we can enhance the data that an OTEL Span natively gives us\n// and since we are using weakmaps, we do not need to clean up after ourselves\nconst SpanScope = new WeakMap<AbstractSpan, Scope>();\nconst SpanFinishScope = new WeakMap<AbstractSpan, Scope>();\nconst SpanHub = new WeakMap<AbstractSpan, Hub>();\nconst SpanParent = new WeakMap<AbstractSpan, Span>();\nconst SpanMetadata = new WeakMap<AbstractSpan, Partial<TransactionMetadata>>();\n\n/** Set the Sentry scope on an OTEL span. */\nexport function setSpanScope(span: AbstractSpan, scope: Scope): void {\n SpanScope.set(span, scope);\n}\n\n/** Get the Sentry scope of an OTEL span. */\nexport function getSpanScope(span: AbstractSpan): Scope | undefined {\n return SpanScope.get(span);\n}\n\n/** Set the Sentry hub on an OTEL span. */\nexport function setSpanHub(span: AbstractSpan, hub: Hub): void {\n SpanHub.set(span, hub);\n}\n\n/** Get the Sentry hub of an OTEL span. */\nexport function getSpanHub(span: AbstractSpan): Hub | undefined {\n return SpanHub.get(span);\n}\n\n/** Set the parent OTEL span on an OTEL span. */\nexport function setSpanParent(span: AbstractSpan, parentSpan: Span): void {\n SpanParent.set(span, parentSpan);\n}\n\n/** Get the parent OTEL span of an OTEL span. */\nexport function getSpanParent(span: AbstractSpan): Span | undefined {\n return SpanParent.get(span);\n}\n\n/** Set metadata for an OTEL span. */\nexport function setSpanMetadata(span: AbstractSpan, metadata: Partial<TransactionMetadata>): void {\n SpanMetadata.set(span, metadata);\n}\n\n/** Get metadata for an OTEL span. */\nexport function getSpanMetadata(span: AbstractSpan): Partial<TransactionMetadata> | undefined {\n return SpanMetadata.get(span);\n}\n\n/** Set the Sentry scope to be used for finishing a given OTEL span. */\nexport function setSpanFinishScope(span: AbstractSpan, scope: Scope): void {\n SpanFinishScope.set(span, scope);\n}\n\n/** Get the Sentry scope to use for finishing an OTEL span. */\nexport function getSpanFinishScope(span: AbstractSpan): Scope | undefined {\n return SpanFinishScope.get(span);\n}\n"],"names":[],"mappings":"AAKA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"spanData.js","sources":["../../../src/utils/spanData.ts"],"sourcesContent":["import type { Span } from '@opentelemetry/api';\nimport type { Hub, Scope, TransactionMetadata } from '@sentry/types';\n\nimport type { AbstractSpan } from '../types';\n\n// We store the parent span, scope & metadata in separate weakmaps, so we can access them for a given span\n// This way we can enhance the data that an OTEL Span natively gives us\n// and since we are using weakmaps, we do not need to clean up after ourselves\nconst SpanScope = new WeakMap<AbstractSpan, Scope>();\nconst SpanFinishScope = new WeakMap<AbstractSpan, Scope>();\nconst SpanHub = new WeakMap<AbstractSpan, Hub>();\nconst SpanParent = new WeakMap<AbstractSpan, Span>();\nconst SpanMetadata = new WeakMap<AbstractSpan, Partial<TransactionMetadata>>();\n\n/** Set the Sentry scope on an OTEL span. */\nexport function setSpanScope(span: AbstractSpan, scope: Scope): void {\n SpanScope.set(span, scope);\n}\n\n/** Get the Sentry scope of an OTEL span. */\nexport function getSpanScope(span: AbstractSpan): Scope | undefined {\n return SpanScope.get(span);\n}\n\n/** Set the Sentry hub on an OTEL span. */\nexport function setSpanHub(span: AbstractSpan, hub: Hub): void {\n SpanHub.set(span, hub);\n}\n\n/** Get the Sentry hub of an OTEL span. */\nexport function getSpanHub(span: AbstractSpan): Hub | undefined {\n return SpanHub.get(span);\n}\n\n/** Set the parent OTEL span on an OTEL span. */\nexport function setSpanParent(span: AbstractSpan, parentSpan: Span): void {\n SpanParent.set(span, parentSpan);\n}\n\n/** Get the parent OTEL span of an OTEL span. */\nexport function getSpanParent(span: AbstractSpan): Span | undefined {\n return SpanParent.get(span);\n}\n\n/** Set metadata for an OTEL span. */\nexport function setSpanMetadata(span: AbstractSpan, metadata: Partial<TransactionMetadata>): void {\n SpanMetadata.set(span, metadata);\n}\n\n/** Get metadata for an OTEL span. */\nexport function getSpanMetadata(span: AbstractSpan): Partial<TransactionMetadata> | undefined {\n return SpanMetadata.get(span);\n}\n\n/** Set the Sentry scope to be used for finishing a given OTEL span. */\nexport function setSpanFinishScope(span: AbstractSpan, scope: Scope): void {\n SpanFinishScope.set(span, scope);\n}\n\n/** Get the Sentry scope to use for finishing an OTEL span. */\nexport function getSpanFinishScope(span: AbstractSpan): Scope | undefined {\n return SpanFinishScope.get(span);\n}\n"],"names":[],"mappings":"AAKA;AACA;AACA;AACA,MAAM,SAAU,GAAE,IAAI,OAAO,EAAuB,CAAA;AACpD,MAAM,eAAgB,GAAE,IAAI,OAAO,EAAuB,CAAA;AAC1D,MAAM,OAAQ,GAAE,IAAI,OAAO,EAAqB,CAAA;AAChD,MAAM,UAAW,GAAE,IAAI,OAAO,EAAsB,CAAA;AACpD,MAAM,YAAa,GAAE,IAAI,OAAO,EAA8C,CAAA;AAC9E;AACA;AACO,SAAS,YAAY,CAAC,IAAI,EAAgB,KAAK,EAAe;AACrE,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AAC5B,CAAA;AACA;AACA;AACO,SAAS,YAAY,CAAC,IAAI,EAAmC;AACpE,EAAE,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAC5B,CAAA;AACA;AACA;AACO,SAAS,UAAU,CAAC,IAAI,EAAgB,GAAG,EAAa;AAC/D,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AACxB,CAAA;AACA;AACA;AACO,SAAS,UAAU,CAAC,IAAI,EAAiC;AAChE,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAA;AACA;AACA;AACO,SAAS,aAAa,CAAC,IAAI,EAAgB,UAAU,EAAc;AAC1E,EAAE,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;AAClC,CAAA;AACA;AACA;AACO,SAAS,aAAa,CAAC,IAAI,EAAkC;AACpE,EAAE,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAC7B,CAAA;AACA;AACA;AACO,SAAS,eAAe,CAAC,IAAI,EAAgB,QAAQ,EAAsC;AAClG,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;AAClC,CAAA;AACA;AACA;AACO,SAAS,eAAe,CAAC,IAAI,EAA0D;AAC9F,EAAE,OAAO,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAC/B,CAAA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,IAAI,EAAgB,KAAK,EAAe;AAC3E,EAAE,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AAClC,CAAA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,IAAI,EAAmC;AAC1E,EAAE,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAClC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spanTypes.js","sources":["../../../src/utils/spanTypes.ts"],"sourcesContent":["import type { SpanKind, SpanStatus } from '@opentelemetry/api';\nimport type { ReadableSpan, TimedEvent } from '@opentelemetry/sdk-trace-base';\n\nimport type { AbstractSpan } from '../types';\n\n/**\n * Check if a given span has attributes.\n * This is necessary because the base `Span` type does not have attributes,\n * so in places where we are passed a generic span, we need to check if we want to access them.\n */\nexport function spanHasAttributes<SpanType extends AbstractSpan>(\n span: SpanType,\n): span is SpanType & { attributes: ReadableSpan['attributes'] } {\n const castSpan = span as ReadableSpan;\n return !!castSpan.attributes && typeof castSpan.attributes === 'object';\n}\n\n/**\n * Check if a given span has a kind.\n * This is necessary because the base `Span` type does not have a kind,\n * so in places where we are passed a generic span, we need to check if we want to access it.\n */\nexport function spanHasKind<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & { kind: SpanKind } {\n const castSpan = span as ReadableSpan;\n return !!castSpan.kind;\n}\n\n/**\n * Check if a given span has a status.\n * This is necessary because the base `Span` type does not have a status,\n * so in places where we are passed a generic span, we need to check if we want to access it.\n */\nexport function spanHasStatus<SpanType extends AbstractSpan>(\n span: SpanType,\n): span is SpanType & { status: SpanStatus } {\n const castSpan = span as ReadableSpan;\n return !!castSpan.status;\n}\n\n/**\n * Check if a given span has a name.\n * This is necessary because the base `Span` type does not have a name,\n * so in places where we are passed a generic span, we need to check if we want to access it.\n */\nexport function spanHasName<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & { name: string } {\n const castSpan = span as ReadableSpan;\n return !!castSpan.name;\n}\n\n/**\n * Check if a given span has a kind.\n * This is necessary because the base `Span` type does not have a kind,\n * so in places where we are passed a generic span, we need to check if we want to access it.\n */\nexport function spanHasParentId<SpanType extends AbstractSpan>(\n span: SpanType,\n): span is SpanType & { parentSpanId: string } {\n const castSpan = span as ReadableSpan;\n return !!castSpan.parentSpanId;\n}\n\n/**\n * Check if a given span has events.\n * This is necessary because the base `Span` type does not have events,\n * so in places where we are passed a generic span, we need to check if we want to access it.\n */\nexport function spanHasEvents<SpanType extends AbstractSpan>(\n span: SpanType,\n): span is SpanType & { events: TimedEvent[] } {\n const castSpan = span as ReadableSpan;\n return Array.isArray(castSpan.events);\n}\n"],"names":[],"mappings":"AAKA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":"spanTypes.js","sources":["../../../src/utils/spanTypes.ts"],"sourcesContent":["import type { SpanKind, SpanStatus } from '@opentelemetry/api';\nimport type { ReadableSpan, TimedEvent } from '@opentelemetry/sdk-trace-base';\n\nimport type { AbstractSpan } from '../types';\n\n/**\n * Check if a given span has attributes.\n * This is necessary because the base `Span` type does not have attributes,\n * so in places where we are passed a generic span, we need to check if we want to access them.\n */\nexport function spanHasAttributes<SpanType extends AbstractSpan>(\n span: SpanType,\n): span is SpanType & { attributes: ReadableSpan['attributes'] } {\n const castSpan = span as ReadableSpan;\n return !!castSpan.attributes && typeof castSpan.attributes === 'object';\n}\n\n/**\n * Check if a given span has a kind.\n * This is necessary because the base `Span` type does not have a kind,\n * so in places where we are passed a generic span, we need to check if we want to access it.\n */\nexport function spanHasKind<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & { kind: SpanKind } {\n const castSpan = span as ReadableSpan;\n return !!castSpan.kind;\n}\n\n/**\n * Check if a given span has a status.\n * This is necessary because the base `Span` type does not have a status,\n * so in places where we are passed a generic span, we need to check if we want to access it.\n */\nexport function spanHasStatus<SpanType extends AbstractSpan>(\n span: SpanType,\n): span is SpanType & { status: SpanStatus } {\n const castSpan = span as ReadableSpan;\n return !!castSpan.status;\n}\n\n/**\n * Check if a given span has a name.\n * This is necessary because the base `Span` type does not have a name,\n * so in places where we are passed a generic span, we need to check if we want to access it.\n */\nexport function spanHasName<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & { name: string } {\n const castSpan = span as ReadableSpan;\n return !!castSpan.name;\n}\n\n/**\n * Check if a given span has a kind.\n * This is necessary because the base `Span` type does not have a kind,\n * so in places where we are passed a generic span, we need to check if we want to access it.\n */\nexport function spanHasParentId<SpanType extends AbstractSpan>(\n span: SpanType,\n): span is SpanType & { parentSpanId: string } {\n const castSpan = span as ReadableSpan;\n return !!castSpan.parentSpanId;\n}\n\n/**\n * Check if a given span has events.\n * This is necessary because the base `Span` type does not have events,\n * so in places where we are passed a generic span, we need to check if we want to access it.\n */\nexport function spanHasEvents<SpanType extends AbstractSpan>(\n span: SpanType,\n): span is SpanType & { events: TimedEvent[] } {\n const castSpan = span as ReadableSpan;\n return Array.isArray(castSpan.events);\n}\n"],"names":[],"mappings":"AAKA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB;AACjC,EAAE,IAAI;AACN,EAAiE;AACjE,EAAE,MAAM,QAAS,GAAE,IAAK,EAAA;AACxB,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,UAAA,IAAc,OAAO,QAAQ,CAAC,UAAW,KAAI,QAAQ,CAAA;AACzE,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW,CAAgC,IAAI,EAAmD;AAClH,EAAE,MAAM,QAAS,GAAE,IAAK,EAAA;AACxB,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAA;AACxB,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,aAAa;AAC7B,EAAE,IAAI;AACN,EAA6C;AAC7C,EAAE,MAAM,QAAS,GAAE,IAAK,EAAA;AACxB,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAA;AAC1B,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW,CAAgC,IAAI,EAAiD;AAChH,EAAE,MAAM,QAAS,GAAE,IAAK,EAAA;AACxB,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAA;AACxB,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,eAAe;AAC/B,EAAE,IAAI;AACN,EAA+C;AAC/C,EAAE,MAAM,QAAS,GAAE,IAAK,EAAA;AACxB,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAA;AAChC,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,aAAa;AAC7B,EAAE,IAAI;AACN,EAA+C;AAC/C,EAAE,MAAM,QAAS,GAAE,IAAK,EAAA;AACxB,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;AACvC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/opentelemetry",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.92.0",
|
|
4
4
|
"description": "Official Sentry utilities for OpenTelemetry",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/opentelemetry",
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": ">=14"
|
|
11
11
|
},
|
|
12
|
+
"files": [
|
|
13
|
+
"cjs",
|
|
14
|
+
"esm",
|
|
15
|
+
"types",
|
|
16
|
+
"types-ts3.8"
|
|
17
|
+
],
|
|
12
18
|
"main": "cjs/index.js",
|
|
13
19
|
"module": "esm/index.js",
|
|
14
20
|
"types": "types/index.d.ts",
|
|
@@ -23,9 +29,9 @@
|
|
|
23
29
|
"access": "public"
|
|
24
30
|
},
|
|
25
31
|
"dependencies": {
|
|
26
|
-
"@sentry/core": "7.
|
|
27
|
-
"@sentry/types": "7.
|
|
28
|
-
"@sentry/utils": "7.
|
|
32
|
+
"@sentry/core": "7.92.0",
|
|
33
|
+
"@sentry/types": "7.92.0",
|
|
34
|
+
"@sentry/utils": "7.92.0"
|
|
29
35
|
},
|
|
30
36
|
"peerDependencies": {
|
|
31
37
|
"@opentelemetry/api": "^1.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/custom/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAS,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,EAAkB,MAAM,EAAoB,MAAM,eAAe,CAAC;AAE9E,OAAO,KAAK,EAAE,mBAAmB,IAAI,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAOpF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,gBAAgB,SAAS,KACvB,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,EAC7B,uBAAuB,SAAS,KAC9B,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,4BAA4B,EAC5D,WAAW,EAAE,gBAAgB,GAAG,uBAAuB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/custom/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAS,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,EAAkB,MAAM,EAAoB,MAAM,eAAe,CAAC;AAE9E,OAAO,KAAK,EAAE,mBAAmB,IAAI,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAOpF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,gBAAgB,SAAS,KACvB,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,EAC7B,uBAAuB,SAAS,KAC9B,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,4BAA4B,EAC5D,WAAW,EAAE,gBAAgB,GAAG,uBAAuB,CA4DxD"}
|
package/types/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { getPropagationContextFromContext, setPropagationContextOnContext, setHu
|
|
|
9
9
|
export { spanHasAttributes, spanHasEvents, spanHasKind, spanHasName, spanHasParentId, spanHasStatus, } from './utils/spanTypes';
|
|
10
10
|
export { isSentryRequestSpan } from './utils/isSentryRequest';
|
|
11
11
|
export { getActiveSpan, getRootSpan } from './utils/getActiveSpan';
|
|
12
|
-
export { startSpan, startInactiveSpan } from './trace';
|
|
12
|
+
export { startSpan, startSpanManual, startInactiveSpan } from './trace';
|
|
13
13
|
export { getCurrentHub, setupGlobalHub, getClient } from './custom/hub';
|
|
14
14
|
export { OpenTelemetryScope } from './custom/scope';
|
|
15
15
|
export { addTracingExtensions } from './custom/hubextensions';
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EACL,UAAU,EACV,eAAe,EACf,aAAa,EACb,YAAY,EACZ,eAAe,EACf,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,gCAAgC,EAAE,8BAA8B,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAExH,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kCAAkC,EAAE,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EACL,UAAU,EACV,eAAe,EACf,aAAa,EACb,YAAY,EACZ,eAAe,EACf,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,gCAAgC,EAAE,8BAA8B,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAExH,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,2CAA2C,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C;;;GAGG;AACH,QAAA,MAAM,SAAS;;;;CAIL,CAAC;AAEX,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spanExporter.d.ts","sourceRoot":"","sources":["../../src/spanExporter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spanExporter.d.ts","sourceRoot":"","sources":["../../src/spanExporter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAqBhF;;GAEG;AACH,qBAAa,kBAAmB,YAAW,YAAY;IACrD,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,QAAQ,CAAU;;IAO1B,kBAAkB;IACX,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GAAG,IAAI;IAoC1F,kBAAkB;IACX,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAMhC,kBAAkB;IACL,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAGzC"}
|
package/types/trace.d.ts
CHANGED
|
@@ -10,6 +10,16 @@ import type { OpenTelemetrySpanContext } from './types';
|
|
|
10
10
|
* Note that you'll always get a span passed to the callback, it may just be a NonRecordingSpan if the span is not sampled.
|
|
11
11
|
*/
|
|
12
12
|
export declare function startSpan<T>(spanContext: OpenTelemetrySpanContext, callback: (span: Span) => T): T;
|
|
13
|
+
/**
|
|
14
|
+
* Similar to `Sentry.startSpan`. Wraps a function with a span, but does not finish the span
|
|
15
|
+
* after the function is done automatically. You'll have to call `span.end()` manually.
|
|
16
|
+
*
|
|
17
|
+
* The created span is the active span and will be used as parent by other spans created inside the function
|
|
18
|
+
* and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.
|
|
19
|
+
*
|
|
20
|
+
* Note that you'll always get a span passed to the callback, it may just be a NonRecordingSpan if the span is not sampled.
|
|
21
|
+
*/
|
|
22
|
+
export declare function startSpanManual<T>(spanContext: OpenTelemetrySpanContext, callback: (span: Span) => T): T;
|
|
13
23
|
/**
|
|
14
24
|
* @deprecated Use {@link startSpan} instead.
|
|
15
25
|
*/
|
package/types/trace.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../src/trace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAU,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../src/trace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAU,MAAM,oBAAoB,CAAC;AAOvD,OAAO,KAAK,EAAuB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAG7E;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,GAAG,CAAC,CAgBlG;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,GAAG,CAAC,CAexG;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,kBAAY,CAAC;AAEzC;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,wBAAwB,GAAG,IAAI,CAU7E"}
|
package/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Span as WriteableSpan, Tracer } from '@opentelemetry/api';
|
|
1
|
+
import type { Attributes, Span as WriteableSpan, SpanKind, TimeInput, Tracer } from '@opentelemetry/api';
|
|
2
2
|
import type { BasicTracerProvider, ReadableSpan, Span } from '@opentelemetry/sdk-trace-base';
|
|
3
3
|
import type { SpanOrigin, TransactionMetadata, TransactionSource } from '@sentry/types';
|
|
4
4
|
export interface OpenTelemetryClient {
|
|
@@ -11,6 +11,9 @@ export interface OpenTelemetrySpanContext {
|
|
|
11
11
|
metadata?: Partial<TransactionMetadata>;
|
|
12
12
|
origin?: SpanOrigin;
|
|
13
13
|
source?: TransactionSource;
|
|
14
|
+
attributes?: Attributes;
|
|
15
|
+
kind?: SpanKind;
|
|
16
|
+
startTime?: TimeInput;
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
16
19
|
* The base `Span` type is basically a `WriteableSpan`.
|
package/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,IAAI,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACzG,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAExF,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,mBAAmB,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACxC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAG3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,YAAY,CAAC;AAExD,YAAY,EAAE,IAAI,EAAE,CAAC"}
|
package/types-ts3.8/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { getPropagationContextFromContext, setPropagationContextOnContext, setHu
|
|
|
9
9
|
export { spanHasAttributes, spanHasEvents, spanHasKind, spanHasName, spanHasParentId, spanHasStatus, } from './utils/spanTypes';
|
|
10
10
|
export { isSentryRequestSpan } from './utils/isSentryRequest';
|
|
11
11
|
export { getActiveSpan, getRootSpan } from './utils/getActiveSpan';
|
|
12
|
-
export { startSpan, startInactiveSpan } from './trace';
|
|
12
|
+
export { startSpan, startSpanManual, startInactiveSpan } from './trace';
|
|
13
13
|
export { getCurrentHub, setupGlobalHub, getClient } from './custom/hub';
|
|
14
14
|
export { OpenTelemetryScope } from './custom/scope';
|
|
15
15
|
export { addTracingExtensions } from './custom/hubextensions';
|
package/types-ts3.8/trace.d.ts
CHANGED
|
@@ -10,6 +10,16 @@ import { OpenTelemetrySpanContext } from './types';
|
|
|
10
10
|
* Note that you'll always get a span passed to the callback, it may just be a NonRecordingSpan if the span is not sampled.
|
|
11
11
|
*/
|
|
12
12
|
export declare function startSpan<T>(spanContext: OpenTelemetrySpanContext, callback: (span: Span) => T): T;
|
|
13
|
+
/**
|
|
14
|
+
* Similar to `Sentry.startSpan`. Wraps a function with a span, but does not finish the span
|
|
15
|
+
* after the function is done automatically. You'll have to call `span.end()` manually.
|
|
16
|
+
*
|
|
17
|
+
* The created span is the active span and will be used as parent by other spans created inside the function
|
|
18
|
+
* and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.
|
|
19
|
+
*
|
|
20
|
+
* Note that you'll always get a span passed to the callback, it may just be a NonRecordingSpan if the span is not sampled.
|
|
21
|
+
*/
|
|
22
|
+
export declare function startSpanManual<T>(spanContext: OpenTelemetrySpanContext, callback: (span: Span) => T): T;
|
|
13
23
|
/**
|
|
14
24
|
* @deprecated Use {@link startSpan} instead.
|
|
15
25
|
*/
|
package/types-ts3.8/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Span as WriteableSpan, Tracer } from '@opentelemetry/api';
|
|
1
|
+
import { Attributes, Span as WriteableSpan, SpanKind, TimeInput, Tracer } from '@opentelemetry/api';
|
|
2
2
|
import { BasicTracerProvider, ReadableSpan, Span } from '@opentelemetry/sdk-trace-base';
|
|
3
3
|
import { SpanOrigin, TransactionMetadata, TransactionSource } from '@sentry/types';
|
|
4
4
|
export interface OpenTelemetryClient {
|
|
@@ -11,6 +11,9 @@ export interface OpenTelemetrySpanContext {
|
|
|
11
11
|
metadata?: Partial<TransactionMetadata>;
|
|
12
12
|
origin?: SpanOrigin;
|
|
13
13
|
source?: TransactionSource;
|
|
14
|
+
attributes?: Attributes;
|
|
15
|
+
kind?: SpanKind;
|
|
16
|
+
startTime?: TimeInput;
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
16
19
|
* The base `Span` type is basically a `WriteableSpan`.
|