@sentry/opentelemetry 10.70.0 → 11.0.0-alpha.1

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.
Files changed (133) hide show
  1. package/README.md +2 -15
  2. package/build/cjs/index.js +614 -101
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/esm/index.js +611 -65
  5. package/build/esm/index.js.map +1 -1
  6. package/build/esm/package.json +1 -1
  7. package/build/types/asyncContextStrategy.d.ts +2 -4
  8. package/build/types/asyncContextStrategy.d.ts.map +1 -1
  9. package/build/types/asyncLocalStorageContextManager.d.ts +16 -4
  10. package/build/types/asyncLocalStorageContextManager.d.ts.map +1 -1
  11. package/build/types/constants.d.ts +0 -15
  12. package/build/types/constants.d.ts.map +1 -1
  13. package/build/types/index.d.ts +5 -4
  14. package/build/types/index.d.ts.map +1 -1
  15. package/build/types/propagator.d.ts +11 -38
  16. package/build/types/propagator.d.ts.map +1 -1
  17. package/build/types/trace.d.ts +4 -31
  18. package/build/types/trace.d.ts.map +1 -1
  19. package/build/types/tracer.d.ts.map +1 -1
  20. package/build/types/tracerProvider.d.ts +0 -9
  21. package/build/types/tracerProvider.d.ts.map +1 -1
  22. package/build/types/types.d.ts +1 -24
  23. package/build/types/types.d.ts.map +1 -1
  24. package/build/types/utils/TraceState.d.ts.map +1 -1
  25. package/build/types/utils/buildContextWithSentryScopes.d.ts +1 -1
  26. package/build/types/utils/buildContextWithSentryScopes.d.ts.map +1 -1
  27. package/build/types/utils/contextData.d.ts.map +1 -1
  28. package/build/types/utils/getActiveSpan.d.ts +2 -1
  29. package/build/types/utils/getActiveSpan.d.ts.map +1 -1
  30. package/build/types/utils/getSamplingDecision.d.ts +0 -17
  31. package/build/types/utils/getSamplingDecision.d.ts.map +1 -1
  32. package/build/types/utils/reconcileDscSampled.d.ts +14 -0
  33. package/build/types/utils/reconcileDscSampled.d.ts.map +1 -0
  34. package/build/types/utils/suppressTracing.d.ts +5 -4
  35. package/build/types/utils/suppressTracing.d.ts.map +1 -1
  36. package/package.json +11 -38
  37. package/build/cjs/asyncContextStrategy-volGaYqZ.js +0 -1892
  38. package/build/cjs/asyncContextStrategy-volGaYqZ.js.map +0 -1
  39. package/build/cjs/index.browser.js +0 -53
  40. package/build/cjs/index.browser.js.map +0 -1
  41. package/build/esm/asyncContextStrategy-jD8YWNDU.js +0 -1857
  42. package/build/esm/asyncContextStrategy-jD8YWNDU.js.map +0 -1
  43. package/build/esm/index.browser.js +0 -14
  44. package/build/esm/index.browser.js.map +0 -1
  45. package/build/types/applyOtelSpanData.d.ts +0 -18
  46. package/build/types/applyOtelSpanData.d.ts.map +0 -1
  47. package/build/types/contextManager.d.ts +0 -22
  48. package/build/types/contextManager.d.ts.map +0 -1
  49. package/build/types/custom/client.d.ts +0 -12
  50. package/build/types/custom/client.d.ts.map +0 -1
  51. package/build/types/exports.d.ts +0 -27
  52. package/build/types/exports.d.ts.map +0 -1
  53. package/build/types/index.browser.d.ts +0 -10
  54. package/build/types/index.browser.d.ts.map +0 -1
  55. package/build/types/nodeAsyncContextStrategy.d.ts +0 -4
  56. package/build/types/nodeAsyncContextStrategy.d.ts.map +0 -1
  57. package/build/types/resource.d.ts +0 -26
  58. package/build/types/resource.d.ts.map +0 -1
  59. package/build/types/sampler.d.ts +0 -32
  60. package/build/types/sampler.d.ts.map +0 -1
  61. package/build/types/semanticAttributes.d.ts +0 -4
  62. package/build/types/semanticAttributes.d.ts.map +0 -1
  63. package/build/types/setupEventContextTrace.d.ts +0 -4
  64. package/build/types/setupEventContextTrace.d.ts.map +0 -1
  65. package/build/types/spanExporter.d.ts +0 -50
  66. package/build/types/spanExporter.d.ts.map +0 -1
  67. package/build/types/spanProcessor.d.ts +0 -31
  68. package/build/types/spanProcessor.d.ts.map +0 -1
  69. package/build/types/utils/backfillStreamedSpanData.d.ts +0 -16
  70. package/build/types/utils/backfillStreamedSpanData.d.ts.map +0 -1
  71. package/build/types/utils/enhanceDscWithOpenTelemetryRootSpanName.d.ts +0 -7
  72. package/build/types/utils/enhanceDscWithOpenTelemetryRootSpanName.d.ts.map +0 -1
  73. package/build/types/utils/getParentSpanId.d.ts +0 -8
  74. package/build/types/utils/getParentSpanId.d.ts.map +0 -1
  75. package/build/types/utils/getRequestSpanData.d.ts +0 -8
  76. package/build/types/utils/getRequestSpanData.d.ts.map +0 -1
  77. package/build/types/utils/getSpanKind.d.ts +0 -10
  78. package/build/types/utils/getSpanKind.d.ts.map +0 -1
  79. package/build/types/utils/getTraceData.d.ts +0 -12
  80. package/build/types/utils/getTraceData.d.ts.map +0 -1
  81. package/build/types/utils/groupSpansWithParents.d.ts +0 -17
  82. package/build/types/utils/groupSpansWithParents.d.ts.map +0 -1
  83. package/build/types/utils/isSentryRequest.d.ts +0 -8
  84. package/build/types/utils/isSentryRequest.d.ts.map +0 -1
  85. package/build/types/utils/mapStatus.d.ts +0 -9
  86. package/build/types/utils/mapStatus.d.ts.map +0 -1
  87. package/build/types/utils/parseSpanDescription.d.ts +0 -56
  88. package/build/types/utils/parseSpanDescription.d.ts.map +0 -1
  89. package/build/types/utils/setupCheck.d.ts +0 -9
  90. package/build/types/utils/setupCheck.d.ts.map +0 -1
  91. package/build/types/utils/spanTypes.d.ts +0 -52
  92. package/build/types/utils/spanTypes.d.ts.map +0 -1
  93. package/build/types-ts3.8/applyOtelSpanData.d.ts +0 -18
  94. package/build/types-ts3.8/asyncContextStrategy.d.ts +0 -9
  95. package/build/types-ts3.8/asyncLocalStorageContextManager.d.ts +0 -31
  96. package/build/types-ts3.8/constants.d.ts +0 -24
  97. package/build/types-ts3.8/contextManager.d.ts +0 -22
  98. package/build/types-ts3.8/custom/client.d.ts +0 -12
  99. package/build/types-ts3.8/debug-build.d.ts +0 -7
  100. package/build/types-ts3.8/exports.d.ts +0 -27
  101. package/build/types-ts3.8/index.browser.d.ts +0 -10
  102. package/build/types-ts3.8/index.d.ts +0 -5
  103. package/build/types-ts3.8/nodeAsyncContextStrategy.d.ts +0 -4
  104. package/build/types-ts3.8/propagator.d.ts +0 -43
  105. package/build/types-ts3.8/resource.d.ts +0 -29
  106. package/build/types-ts3.8/sampler.d.ts +0 -32
  107. package/build/types-ts3.8/semanticAttributes.d.ts +0 -4
  108. package/build/types-ts3.8/setupEventContextTrace.d.ts +0 -4
  109. package/build/types-ts3.8/spanExporter.d.ts +0 -50
  110. package/build/types-ts3.8/spanProcessor.d.ts +0 -31
  111. package/build/types-ts3.8/trace.d.ts +0 -75
  112. package/build/types-ts3.8/tracer.d.ts +0 -13
  113. package/build/types-ts3.8/tracerProvider.d.ts +0 -23
  114. package/build/types-ts3.8/types.d.ts +0 -29
  115. package/build/types-ts3.8/utils/TraceState.d.ts +0 -21
  116. package/build/types-ts3.8/utils/backfillStreamedSpanData.d.ts +0 -16
  117. package/build/types-ts3.8/utils/buildContextWithSentryScopes.d.ts +0 -12
  118. package/build/types-ts3.8/utils/contextData.d.ts +0 -30
  119. package/build/types-ts3.8/utils/enhanceDscWithOpenTelemetryRootSpanName.d.ts +0 -7
  120. package/build/types-ts3.8/utils/getActiveSpan.d.ts +0 -6
  121. package/build/types-ts3.8/utils/getParentSpanId.d.ts +0 -8
  122. package/build/types-ts3.8/utils/getRequestSpanData.d.ts +0 -8
  123. package/build/types-ts3.8/utils/getSamplingDecision.d.ts +0 -27
  124. package/build/types-ts3.8/utils/getSpanKind.d.ts +0 -10
  125. package/build/types-ts3.8/utils/getTraceData.d.ts +0 -12
  126. package/build/types-ts3.8/utils/groupSpansWithParents.d.ts +0 -17
  127. package/build/types-ts3.8/utils/isSentryRequest.d.ts +0 -8
  128. package/build/types-ts3.8/utils/makeTraceState.d.ts +0 -10
  129. package/build/types-ts3.8/utils/mapStatus.d.ts +0 -9
  130. package/build/types-ts3.8/utils/parseSpanDescription.d.ts +0 -56
  131. package/build/types-ts3.8/utils/setupCheck.d.ts +0 -9
  132. package/build/types-ts3.8/utils/spanTypes.d.ts +0 -52
  133. package/build/types-ts3.8/utils/suppressTracing.d.ts +0 -5
@@ -1,27 +0,0 @@
1
- export { SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION } from './semanticAttributes';
2
- export { getRequestSpanData } from './utils/getRequestSpanData';
3
- export type { OpenTelemetryClient } from './types';
4
- export { wrapClientClass } from './custom/client';
5
- export { getSpanKind } from './utils/getSpanKind';
6
- export { getScopesFromContext } from './utils/contextData';
7
- export { spanHasAttributes, spanHasEvents, spanHasKind, spanHasName, spanHasParentId, spanHasStatus, } from './utils/spanTypes';
8
- export { getDynamicSamplingContextFromSpan } from '@sentry/core';
9
- export { isSentryRequestSpan } from './utils/isSentryRequest';
10
- export { enhanceDscWithOpenTelemetryRootSpanName } from './utils/enhanceDscWithOpenTelemetryRootSpanName';
11
- export { getActiveSpan } from './utils/getActiveSpan';
12
- export { startSpan, startSpanManual, startInactiveSpan, withActiveSpan, continueTrace, getTraceContextForScope, } from './trace';
13
- export { suppressTracing } from './utils/suppressTracing';
14
- export { setupEventContextTrace } from './setupEventContextTrace';
15
- export { wrapContextManagerClass } from './contextManager';
16
- export { SentryPropagator, shouldPropagateTraceForUrl } from './propagator';
17
- export { SentrySpanProcessor } from './spanProcessor';
18
- export { SentrySampler, wrapSamplingDecision } from './sampler';
19
- export { applyOtelSpanData } from './applyOtelSpanData';
20
- export { backfillStreamedSpanDataFromOtel } from './utils/backfillStreamedSpanData';
21
- export { SentryTracerProvider } from './tracerProvider';
22
- export type { OpenTelemetryTracerProvider } from './types';
23
- export { openTelemetrySetupCheck, setIsSetup } from './utils/setupCheck';
24
- export { getSentryResource } from './resource';
25
- export { withStreamedSpan } from '@sentry/core';
26
- export { getClient } from '@sentry/core';
27
- //# sourceMappingURL=exports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2CAA2C,EAAE,MAAM,sBAAsB,CAAC;AAEnF,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;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,WAAW,EACX,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,iCAAiC,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,uCAAuC,EAAE,MAAM,iDAAiD,CAAC;AAE1G,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EACL,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,uBAAuB,GACxB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,YAAY,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -1,10 +0,0 @@
1
- export * from './exports';
2
- export declare class SentryAsyncLocalStorageContextManager {
3
- constructor();
4
- }
5
- export { setOpenTelemetryContextAsyncContextStrategy } from './asyncContextStrategy';
6
- export type AsyncLocalStorageLookup = {
7
- asyncLocalStorage: unknown;
8
- contextSymbol: symbol;
9
- };
10
- //# sourceMappingURL=index.browser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../../src/index.browser.ts"],"names":[],"mappings":"AAEA,cAAc,WAAW,CAAC;AAG1B,qBAAa,qCAAqC;;CAOjD;AAGD,OAAO,EAAE,2CAA2C,EAAE,MAAM,wBAAwB,CAAC;AAErF,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare function setNodeOpenTelemetryContextAsyncContextStrategy(options?: {
2
- skipOpenTelemetrySetup?: boolean;
3
- }): void;
4
- //# sourceMappingURL=nodeAsyncContextStrategy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nodeAsyncContextStrategy.d.ts","sourceRoot":"","sources":["../../src/nodeAsyncContextStrategy.ts"],"names":[],"mappings":"AAgBA,wBAAgB,+CAA+C,CAAC,OAAO,CAAC,EAAE;IAAE,sBAAsB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAMpH"}
@@ -1,26 +0,0 @@
1
- import type { Attributes, AttributeValue } from '@opentelemetry/api';
2
- type RawResourceAttribute = [string, AttributeValue | undefined];
3
- /**
4
- * Minimal Resource implementation that satisfies the OpenTelemetry Resource interface
5
- * used by BasicTracerProvider, without depending on `@opentelemetry/resources`.
6
- */
7
- declare class SentryResource {
8
- private _attributes;
9
- constructor(attributes: Attributes);
10
- get attributes(): Attributes;
11
- merge(other: SentryResource | null): SentryResource;
12
- getRawAttributes(): RawResourceAttribute[];
13
- }
14
- /**
15
- * Returns a Resource for use in Sentry's OpenTelemetry TracerProvider setup.
16
- *
17
- * Combines the default OTel SDK telemetry attributes with Sentry-specific
18
- * service attributes, equivalent to what was previously done via:
19
- * `defaultResource().merge(resourceFromAttributes({ ... }))`
20
- *
21
- * Respects OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES environment variables
22
- * per the OpenTelemetry specification.
23
- */
24
- export declare function getSentryResource(serviceNameFallback: string): SentryResource;
25
- export {};
26
- //# sourceMappingURL=resource.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAerE,KAAK,oBAAoB,GAAG,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS,CAAC,CAAC;AAEjE;;;GAGG;AACH,cAAM,cAAc;IAClB,OAAO,CAAC,WAAW,CAAa;gBAEb,UAAU,EAAE,UAAU;IAIzC,IAAW,UAAU,IAAI,UAAU,CAElC;IAEM,KAAK,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,GAAG,cAAc;IAOnD,gBAAgB,IAAI,oBAAoB,EAAE;CAGlD;AA6BD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,mBAAmB,EAAE,MAAM,GAAG,cAAc,CAoB7E"}
@@ -1,32 +0,0 @@
1
- import type { Context } from '@opentelemetry/api';
2
- import { SpanKind } from '@opentelemetry/api';
3
- import type { Sampler, SamplingResult } from '@opentelemetry/sdk-trace-base';
4
- import { SamplingDecision } from '@opentelemetry/sdk-trace-base';
5
- import type { Client, SpanAttributes } from '@sentry/core';
6
- /**
7
- * A custom OTEL sampler that uses Sentry sampling rates to make its decision
8
- */
9
- export declare class SentrySampler implements Sampler {
10
- private _client;
11
- private _isSpanStreaming;
12
- constructor(client: Client);
13
- /** @inheritDoc */
14
- shouldSample(context: Context, traceId: string, spanName: string, spanKind: SpanKind, spanAttributes: SpanAttributes, _links: unknown): SamplingResult;
15
- /** Returns the sampler name or short description with the configuration. */
16
- toString(): string;
17
- }
18
- /**
19
- * Wrap a sampling decision with data that Sentry needs to work properly with it.
20
- * If you pass `decision: undefined`, it will be treated as `NOT_RECORDING`, but in contrast to passing `NOT_RECORDING`
21
- * it will not propagate this decision to downstream Sentry SDKs.
22
- */
23
- export declare function wrapSamplingDecision({ decision, context, spanAttributes, sampleRand, downstreamTraceSampleRate, ignoredChildSpan, ignoredSegmentSpan, }: {
24
- decision: SamplingDecision | undefined;
25
- context: Context;
26
- spanAttributes: SpanAttributes;
27
- sampleRand?: number;
28
- downstreamTraceSampleRate?: number;
29
- ignoredChildSpan?: boolean;
30
- ignoredSegmentSpan?: boolean;
31
- }): SamplingResult;
32
- //# sourceMappingURL=sampler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sampler.d.ts","sourceRoot":"","sources":["../../src/sampler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAA2C,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAsB,QAAQ,EAAS,MAAM,oBAAoB,CAAC;AAEzE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AA4B3D;;GAEG;AACH,qBAAa,aAAc,YAAW,OAAO;IAC3C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,gBAAgB,CAAU;gBAEf,MAAM,EAAE,MAAM;IAMjC,kBAAkB;IACX,YAAY,CACjB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,OAAO,GACd,cAAc;IAoLjB,4EAA4E;IACrE,QAAQ,IAAI,MAAM;CAG1B;AAuBD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,cAAc,EACd,UAAU,EACV,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,GACnB,EAAE;IACD,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,cAAc,CAkCjB"}
@@ -1,4 +0,0 @@
1
- /** If this attribute is true, it means that the parent is a remote span. */
2
- export declare const SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE = "sentry.parentIsRemote";
3
- export declare const SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION = "sentry.graphql.operation";
4
- //# sourceMappingURL=semanticAttributes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"semanticAttributes.d.ts","sourceRoot":"","sources":["../../src/semanticAttributes.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,eAAO,MAAM,0CAA0C,0BAA0B,CAAC;AAGlF,eAAO,MAAM,2CAA2C,6BAA6B,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { Client } from '@sentry/core';
2
- /** Ensure the `trace` context is set on all events. */
3
- export declare function setupEventContextTrace(client: Client): void;
4
- //# sourceMappingURL=setupEventContextTrace.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setupEventContextTrace.d.ts","sourceRoot":"","sources":["../../src/setupEventContextTrace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,uDAAuD;AACvD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAwB3D"}
@@ -1,50 +0,0 @@
1
- import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
2
- import type { TransactionEvent } from '@sentry/core';
3
- /**
4
- * A Sentry-specific exporter that converts OpenTelemetry Spans to Sentry Spans & Transactions.
5
- */
6
- export declare class SentrySpanExporter {
7
- private _finishedSpanBuckets;
8
- private _finishedSpanBucketSize;
9
- private _spansToBucketEntry;
10
- private _lastCleanupTimestampInS;
11
- private _sentSpans;
12
- private _debouncedFlush;
13
- constructor(options?: {
14
- /** Lower bound of time in seconds until spans that are buffered but have not been sent as part of a transaction get cleared from memory. */
15
- timeout?: number;
16
- });
17
- /**
18
- * Export a single span.
19
- * This is called by the span processor whenever a span is ended.
20
- */
21
- export(span: ReadableSpan): void;
22
- /**
23
- * Try to flush any pending spans immediately.
24
- * This is called internally by the exporter (via _debouncedFlush),
25
- * but can also be triggered externally if we force-flush.
26
- */
27
- flush(): void;
28
- /**
29
- * Clear the exporter.
30
- * This is called when the span processor is shut down.
31
- */
32
- clear(): void;
33
- /**
34
- * Send the given spans, but only if they are part of a finished transaction.
35
- *
36
- * Returns the sent spans.
37
- * Spans remain unsent when their parent span is not yet finished.
38
- * This will happen regularly, as child spans are generally finished before their parents.
39
- * But it _could_ also happen because, for whatever reason, a parent span was lost.
40
- * In this case, we'll eventually need to clean this up.
41
- */
42
- private _maybeSend;
43
- /** Check if a node is a completed root node or a node whose parent has already been sent */
44
- private _nodeIsCompletedRootNodeOrHasSentParent;
45
- /** Get all completed root nodes from a list of nodes */
46
- private _getCompletedRootNodes;
47
- }
48
- /** Exported only for tests. */
49
- export declare function createTransactionForOtelSpan(span: ReadableSpan): TransactionEvent;
50
- //# sourceMappingURL=spanExporter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanExporter.d.ts","sourceRoot":"","sources":["../../src/spanExporter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAKV,gBAAgB,EAEjB,MAAM,cAAc,CAAC;AAuCtB;;GAEG;AACH,qBAAa,kBAAkB;IAiB7B,OAAO,CAAC,oBAAoB,CAAqC;IACjE,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,mBAAmB,CAA4C;IACvE,OAAO,CAAC,wBAAwB,CAAS;IACzC,OAAO,CAAC,UAAU,CAAyB;IAE3C,OAAO,CAAC,eAAe,CAA8B;gBAElC,OAAO,CAAC,EAAE;QAC3B,4IAA4I;QAC5I,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IASD;;;OAGG;IACI,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAoCvC;;;;OAIG;IACI,KAAK,IAAI,IAAI;IA0BpB;;;OAGG;IACI,KAAK,IAAI,IAAI;IAMpB;;;;;;;;OAQG;IACH,OAAO,CAAC,UAAU;IAsDlB,4FAA4F;IAC5F,OAAO,CAAC,uCAAuC;IAI/C,wDAAwD;IACxD,OAAO,CAAC,sBAAsB;CAK/B;AAYD,+BAA+B;AAC/B,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,YAAY,GAAG,gBAAgB,CAoEjF"}
@@ -1,31 +0,0 @@
1
- import type { Context } from '@opentelemetry/api';
2
- import type { ReadableSpan, Span, SpanProcessor as SpanProcessorInterface } from '@opentelemetry/sdk-trace-base';
3
- import type { Client } from '@sentry/core';
4
- /**
5
- * Converts OpenTelemetry Spans to Sentry Spans and sends them to Sentry via
6
- * the Sentry SDK.
7
- */
8
- export declare class SentrySpanProcessor implements SpanProcessorInterface {
9
- private _exporter;
10
- private _client;
11
- private _unsubscribePreprocessSpan;
12
- constructor(options?: {
13
- timeout?: number;
14
- client?: Client;
15
- });
16
- /**
17
- * @inheritDoc
18
- */
19
- forceFlush(): Promise<void>;
20
- /**
21
- * @inheritDoc
22
- */
23
- shutdown(): Promise<void>;
24
- /**
25
- * @inheritDoc
26
- */
27
- onStart(span: Span, parentContext: Context): void;
28
- /** @inheritDoc */
29
- onEnd(span: Span & ReadableSpan): void;
30
- }
31
- //# sourceMappingURL=spanProcessor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanProcessor.d.ts","sourceRoot":"","sources":["../../src/spanProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACjH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAgB3C;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,sBAAsB;IAChE,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,0BAA0B,CAAuC;gBAEtD,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;IAclE;;OAEG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxC;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtC;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI;IAmCxD,kBAAkB;IACX,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,GAAG,IAAI;CAW9C"}
@@ -1,16 +0,0 @@
1
- import type { StreamedSpanJSON } from '@sentry/core';
2
- /**
3
- * Backfill op, source, name and data on a streamed span JSON from OTel semantic conventions.
4
- * Mirrors the inference the {@link SentrySpanExporter} applies to non-streamed spans via `getSpanData`.
5
- * Explicitly set attributes are preserved via `safeSetSpanJSONAttributes`.
6
- *
7
- * Runs as a `preprocessSpan` subscriber (streamed-only) on both span pipelines: the OTel SDK
8
- * `SentrySpanProcessor` and the `SentryTracerProvider`. On the latter, `applyOtelSpanData` has already
9
- * inferred most data on the native span; this fills the remaining gap (per-span `sentry.source` on
10
- * child spans, which `applyOtelSpanData` only sets on segment roots). `inferSpanData` is deterministic
11
- * on the same attributes, so re-running it here is a no-op for already-inferred fields.
12
- */
13
- export declare function backfillStreamedSpanDataFromOtel(spanJSON: StreamedSpanJSON, hint?: {
14
- spanKind?: number;
15
- }): void;
16
- //# sourceMappingURL=backfillStreamedSpanData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"backfillStreamedSpanData.d.ts","sourceRoot":"","sources":["../../../src/utils/backfillStreamedSpanData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWrE;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAwB/G"}
@@ -1,7 +0,0 @@
1
- import type { Client } from '@sentry/core';
2
- /**
3
- * Setup a DSC handler on the passed client,
4
- * ensuring that the transaction name is inferred from the span correctly.
5
- */
6
- export declare function enhanceDscWithOpenTelemetryRootSpanName(client: Client): void;
7
- //# sourceMappingURL=enhanceDscWithOpenTelemetryRootSpanName.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enhanceDscWithOpenTelemetryRootSpanName.d.ts","sourceRoot":"","sources":["../../../src/utils/enhanceDscWithOpenTelemetryRootSpanName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAK3C;;;GAGG;AACH,wBAAgB,uCAAuC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAiC5E"}
@@ -1,8 +0,0 @@
1
- import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
2
- /**
3
- * Get the parent span id from a span.
4
- * In OTel v1, the parent span id is accessed as `parentSpanId`
5
- * In OTel v2, the parent span id is accessed as `spanId` on the `parentSpanContext`
6
- */
7
- export declare function getParentSpanId(span: ReadableSpan): string | undefined;
8
- //# sourceMappingURL=getParentSpanId.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getParentSpanId.d.ts","sourceRoot":"","sources":["../../../src/utils/getParentSpanId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAQtE"}
@@ -1,8 +0,0 @@
1
- import type { Span } from '@opentelemetry/api';
2
- import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
3
- import type { SanitizedRequestData } from '@sentry/core';
4
- /**
5
- * Get sanitizied request data from an OTEL span.
6
- */
7
- export declare function getRequestSpanData(span: Span | ReadableSpan): Partial<SanitizedRequestData>;
8
- //# sourceMappingURL=getRequestSpanData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getRequestSpanData.d.ts","sourceRoot":"","sources":["../../../src/utils/getRequestSpanData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAIzD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAsC3F"}
@@ -1,10 +0,0 @@
1
- import { SpanKind } from '@opentelemetry/api';
2
- import type { AbstractSpan } from '../types';
3
- /**
4
- * Get the span kind from a span.
5
- * For whatever reason, this is not public API on the generic "Span" type,
6
- * so we need to check if we actually have a `SDKTraceBaseSpan` where we can fetch this from.
7
- * Otherwise, we fall back to `SpanKind.INTERNAL`.
8
- */
9
- export declare function getSpanKind(span: AbstractSpan): SpanKind;
10
- //# sourceMappingURL=getSpanKind.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getSpanKind.d.ts","sourceRoot":"","sources":["../../../src/utils/getSpanKind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,QAAQ,CAMxD"}
@@ -1,12 +0,0 @@
1
- import type { Client, Scope, SerializedTraceData, Span } from '@sentry/core';
2
- /**
3
- * Otel-specific implementation of `getTraceData`.
4
- * @see `@sentry/core` version of `getTraceData` for more information
5
- */
6
- export declare function getTraceData({ span, scope, client, propagateTraceparent, }?: {
7
- span?: Span;
8
- scope?: Scope;
9
- client?: Client;
10
- propagateTraceparent?: boolean;
11
- }): SerializedTraceData;
12
- //# sourceMappingURL=getTraceData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getTraceData.d.ts","sourceRoot":"","sources":["../../../src/utils/getTraceData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAU7E;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAK,EACL,MAAM,EACN,oBAAoB,GACrB,GAAE;IAAE,IAAI,CAAC,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,mBAAmB,CAqB5G"}
@@ -1,17 +0,0 @@
1
- import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
2
- export interface SpanNode {
3
- id: string;
4
- span?: ReadableSpan;
5
- parentNode?: SpanNode | undefined;
6
- children: SpanNode[];
7
- }
8
- /**
9
- * This function runs through a list of OTEL Spans, and wraps them in an `SpanNode`
10
- * where each node holds a reference to their parent node.
11
- */
12
- export declare function groupSpansWithParents(spans: ReadableSpan[]): SpanNode[];
13
- /**
14
- * This returns the _local_ parent ID - `parentId` on the span may point to a remote span.
15
- */
16
- export declare function getLocalParentId(span: ReadableSpan): string | undefined;
17
- //# sourceMappingURL=groupSpansWithParents.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groupSpansWithParents.d.ts","sourceRoot":"","sources":["../../../src/utils/groupSpansWithParents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAIlE,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACtB;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,QAAQ,EAAE,CAUvE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAKvE"}
@@ -1,8 +0,0 @@
1
- import type { AbstractSpan } from '../types';
2
- /**
3
- *
4
- * @param otelSpan Checks whether a given OTEL Span is an http request to sentry.
5
- * @returns boolean
6
- */
7
- export declare function isSentryRequestSpan(span: AbstractSpan): boolean;
8
- //# sourceMappingURL=isSentryRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isSentryRequest.d.ts","sourceRoot":"","sources":["../../../src/utils/isSentryRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAgB/D"}
@@ -1,9 +0,0 @@
1
- import type { SpanAttributes, SpanStatus } from '@sentry/core';
2
- import type { AbstractSpan } from '../types';
3
- export declare const isStatusErrorMessageValid: (message: string) => boolean;
4
- /**
5
- * Get a Sentry span status from an otel span.
6
- */
7
- export declare function mapStatus(span: AbstractSpan): SpanStatus;
8
- export declare function inferStatusFromAttributes(attributes: SpanAttributes): SpanStatus | undefined;
9
- //# sourceMappingURL=mapStatus.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapStatus.d.ts","sourceRoot":"","sources":["../../../src/utils/mapStatus.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAuB7C,eAAO,MAAM,yBAAyB,GAAI,SAAS,MAAM,KAAG,OAE3D,CAAC;AAEF;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAsCxD;AAED,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,cAAc,GAAG,UAAU,GAAG,SAAS,CAwB5F"}
@@ -1,56 +0,0 @@
1
- import type { Attributes, AttributeValue } from '@opentelemetry/api';
2
- import { SpanKind } from '@opentelemetry/api';
3
- import type { SpanAttributes, TransactionSource } from '@sentry/core';
4
- import type { AbstractSpan } from '../types';
5
- interface SpanDescription {
6
- op: string | undefined;
7
- description: string;
8
- source: TransactionSource;
9
- data?: Record<string, string | undefined>;
10
- }
11
- /**
12
- * Infer the op & description for a set of name, attributes and kind of a span.
13
- */
14
- export declare function inferSpanData(spanName: string, attributes: SpanAttributes, kind: SpanKind): SpanDescription;
15
- /**
16
- * Extract better op/description from an otel span.
17
- *
18
- * Does not overwrite the span name if the source is already set to custom to ensure
19
- * that user-updated span names are preserved. In this case, we only adjust the op but
20
- * leave span description and source unchanged.
21
- *
22
- * Based on https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7422ce2a06337f68a59b552b8c5a2ac125d6bae5/exporter/sentryexporter/sentry_exporter.go#L306
23
- */
24
- export declare function parseSpanDescription(span: AbstractSpan): SpanDescription;
25
- /** Only exported for tests. */
26
- export declare function descriptionForHttpMethod({ name, kind, attributes }: {
27
- name: string;
28
- attributes: Attributes;
29
- kind: SpanKind;
30
- }, httpMethod: AttributeValue): SpanDescription;
31
- /** Exported for tests only */
32
- export declare function getSanitizedUrl(attributes: Attributes, kind: SpanKind): {
33
- url: string | undefined;
34
- urlPath: string | undefined;
35
- query: string | undefined;
36
- fragment: string | undefined;
37
- hasRoute: boolean;
38
- };
39
- /**
40
- * Because Otel instrumentation sometimes mutates span names via `span.updateName`, the only way
41
- * to ensure that a user-set span name is preserved is to store it as a tmp attribute on the span.
42
- * We delete this attribute once we're done with it when preparing the event envelope.
43
- *
44
- * This temp attribute always takes precedence over the original name.
45
- *
46
- * We also need to take care of setting the correct source. Users can always update the source
47
- * after updating the name, so we need to respect that.
48
- *
49
- * @internal exported only for testing
50
- */
51
- export declare function getUserUpdatedNameAndSource(originalName: string, attributes: Attributes, fallbackSource?: TransactionSource): {
52
- description: string;
53
- source: TransactionSource;
54
- };
55
- export {};
56
- //# sourceMappingURL=parseSpanDescription.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parseSpanDescription.d.ts","sourceRoot":"","sources":["../../../src/utils/parseSpanDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAe9C,OAAO,KAAK,EAAQ,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAY5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,GAAG,eAAe,CAqD3G;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,eAAe,CAkBxE;AA2BD,+BAA+B;AAC/B,wBAAgB,wBAAwB,CACtC,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,EACpF,UAAU,EAAE,cAAc,GACzB,eAAe,CAgFjB;AAmBD,8BAA8B;AAC9B,wBAAgB,eAAe,CAC7B,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,QAAQ,GACb;IACD,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAiCA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,UAAU,EACtB,cAAc,GAAE,iBAA4B,GAC3C;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAYA"}
@@ -1,9 +0,0 @@
1
- type OpenTelemetryElement = 'SentrySpanProcessor' | 'SentryContextManager' | 'SentryPropagator' | 'SentrySampler' | 'SentryTracerProvider';
2
- /** Get all the OpenTelemetry elements that have been set up. */
3
- export declare function openTelemetrySetupCheck(): OpenTelemetryElement[];
4
- /** Mark an OpenTelemetry element as setup. */
5
- export declare function setIsSetup(element: OpenTelemetryElement): void;
6
- /** Only exported for tests. */
7
- export declare function clearOpenTelemetrySetupCheck(): void;
8
- export {};
9
- //# sourceMappingURL=setupCheck.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setupCheck.d.ts","sourceRoot":"","sources":["../../../src/utils/setupCheck.ts"],"names":[],"mappings":"AAAA,KAAK,oBAAoB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,kBAAkB,GAClB,eAAe,GACf,sBAAsB,CAAC;AAI3B,gEAAgE;AAChE,wBAAgB,uBAAuB,IAAI,oBAAoB,EAAE,CAEhE;AAED,8CAA8C;AAC9C,wBAAgB,UAAU,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAE9D;AAED,+BAA+B;AAC/B,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
@@ -1,52 +0,0 @@
1
- import type { SpanKind, SpanStatus } from '@opentelemetry/api';
2
- import type { ReadableSpan, TimedEvent } from '@opentelemetry/sdk-trace-base';
3
- import type { AbstractSpan } from '../types';
4
- /**
5
- * Check if a given span has attributes.
6
- * This is necessary because the base `Span` type does not have attributes,
7
- * so in places where we are passed a generic span, we need to check if we want to access them.
8
- */
9
- export declare function spanHasAttributes<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
10
- attributes: ReadableSpan['attributes'];
11
- };
12
- /**
13
- * Check if a given span has a kind.
14
- * This is necessary because the base `Span` type does not have a kind,
15
- * so in places where we are passed a generic span, we need to check if we want to access it.
16
- */
17
- export declare function spanHasKind<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
18
- kind: SpanKind;
19
- };
20
- /**
21
- * Check if a given span has a status.
22
- * This is necessary because the base `Span` type does not have a status,
23
- * so in places where we are passed a generic span, we need to check if we want to access it.
24
- */
25
- export declare function spanHasStatus<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
26
- status: SpanStatus;
27
- };
28
- /**
29
- * Check if a given span has a name.
30
- * This is necessary because the base `Span` type does not have a name,
31
- * so in places where we are passed a generic span, we need to check if we want to access it.
32
- */
33
- export declare function spanHasName<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
34
- name: string;
35
- };
36
- /**
37
- * Check if a given span has a kind.
38
- * This is necessary because the base `Span` type does not have a kind,
39
- * so in places where we are passed a generic span, we need to check if we want to access it.
40
- */
41
- export declare function spanHasParentId<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
42
- parentSpanId: string;
43
- };
44
- /**
45
- * Check if a given span has events.
46
- * This is necessary because the base `Span` type does not have events,
47
- * so in places where we are passed a generic span, we need to check if we want to access it.
48
- */
49
- export declare function spanHasEvents<SpanType extends AbstractSpan>(span: SpanType): span is SpanType & {
50
- events: TimedEvent[];
51
- };
52
- //# sourceMappingURL=spanTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanTypes.d.ts","sourceRoot":"","sources":["../../../src/utils/spanTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,YAAY,EAC7D,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;CAAE,CAG/D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,IAAI,QAAQ,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAGhH;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EACzD,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,CAG3C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,SAAS,YAAY,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,IAAI,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAG9G;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,SAAS,YAAY,EAC3D,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAG7C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,SAAS,YAAY,EACzD,IAAI,EAAE,QAAQ,GACb,IAAI,IAAI,QAAQ,GAAG;IAAE,MAAM,EAAE,UAAU,EAAE,CAAA;CAAE,CAG7C"}
@@ -1,18 +0,0 @@
1
- import { SpanKind } from '@opentelemetry/api';
2
- import { Span } from '@sentry/core';
3
- /**
4
- * Backfill a native Sentry span with the data the OpenTelemetry SDK pipeline would otherwise derive
5
- * from OTel semantic attributes: `sentry.op`, `sentry.source`, the span name, `otel.kind`, and status.
6
- *
7
- * On the OTel SDK provider this happens in the `SentrySpanProcessor`/`SentrySpanExporter` while
8
- * converting `ReadableSpan`s to Sentry payloads (via `parseSpanDescription` + `mapStatus`).
9
- * `SentryTracerProvider` creates native Sentry spans directly and never goes through that pipeline,
10
- * so the same inference has to run here instead — once at span start, and again at span end
11
- * (`finalizeStatus`, once attributes like `http.route` and the status code are available).
12
- */
13
- export declare function applyOtelSpanData(span: Span, options?: {
14
- finalizeStatus?: boolean;
15
- }): void;
16
- /** Stash the OTel span kind on a Sentry span so {@link applyOtelSpanData} can read it. */
17
- export declare function applyOtelSpanKind(span: Span, kind: SpanKind | undefined): void;
18
- //# sourceMappingURL=applyOtelSpanData.d.ts.map
@@ -1,9 +0,0 @@
1
- import { TracingChannelBinding } from '@sentry/core';
2
- /**
3
- * Sets the async context strategy to use follow the OTEL context under the hood.
4
- * We handle forking a hub inside of our custom OTEL Context Manager (./otelContextManager.ts)
5
- */
6
- export declare function setOpenTelemetryContextAsyncContextStrategy(options?: {
7
- getTracingChannelBinding?: () => TracingChannelBinding | undefined;
8
- }): void;
9
- //# sourceMappingURL=asyncContextStrategy.d.ts.map
@@ -1,31 +0,0 @@
1
- import { Context, ContextManager } from '@opentelemetry/api';
2
- import { AsyncLocalStorage } from 'node:async_hooks';
3
- import { AsyncLocalStorageLookup } from './contextManager';
4
- /**
5
- * OpenTelemetry-compatible context manager using Node.js `AsyncLocalStorage`.
6
- * Semantics match `@opentelemetry/context-async-hooks` (function `bind` + `EventEmitter` patching).
7
- */
8
- export declare class SentryAsyncLocalStorageContextManager implements ContextManager {
9
- protected readonly _asyncLocalStorage: AsyncLocalStorage<Context>;
10
- private readonly _kOtListeners;
11
- private _wrapped;
12
- constructor();
13
- active(): Context;
14
- with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(context: Context, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
15
- enable(): this;
16
- disable(): this;
17
- bind<T>(context: Context, target: T): T;
18
- /**
19
- * Gets underlying AsyncLocalStorage and symbol to allow lookup of scope.
20
- * This is Sentry-specific.
21
- */
22
- getAsyncLocalStorageLookup(): AsyncLocalStorageLookup;
23
- private _bindFunction;
24
- private _bindEventEmitter;
25
- private _patchRemoveListener;
26
- private _patchRemoveAllListeners;
27
- private _patchAddListener;
28
- private _createPatchMap;
29
- private _getPatchMap;
30
- }
31
- //# sourceMappingURL=asyncLocalStorageContextManager.d.ts.map
@@ -1,24 +0,0 @@
1
- export declare const SENTRY_TRACE_HEADER = "sentry-trace";
2
- export declare const SENTRY_BAGGAGE_HEADER = "baggage";
3
- export declare const SENTRY_TRACE_STATE_DSC = "sentry.dsc";
4
- export declare const SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING = "sentry.sampled_not_recording";
5
- export declare const SENTRY_TRACE_STATE_URL = "sentry.url";
6
- export declare const SENTRY_TRACE_STATE_SAMPLE_RAND = "sentry.sample_rand";
7
- export declare const SENTRY_TRACE_STATE_SAMPLE_RATE = "sentry.sample_rate";
8
- /**
9
- * A flag marking a context as ignored because the span associated with the context
10
- * is ignored (`ignoreSpans` filter).
11
- */
12
- export declare const SENTRY_TRACE_STATE_CHILD_IGNORED = "sentry.ignored";
13
- /**
14
- * A flag marking a segment span as ignored because it matched the `ignoreSpans` filter.
15
- * Unlike `SENTRY_TRACE_STATE_CHILD_IGNORED` (used for child spans), this flag is NOT consumed
16
- * by the context manager for re-parenting. Instead, it propagates to child spans so they
17
- * can record the correct client report outcome (`ignored` instead of `sample_rate`).
18
- */
19
- export declare const SENTRY_TRACE_STATE_SEGMENT_IGNORED = "sentry.segment_ignored";
20
- export declare const SENTRY_SCOPES_CONTEXT_KEY: symbol;
21
- export declare const SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY: symbol;
22
- export declare const SENTRY_FORK_SET_SCOPE_CONTEXT_KEY: symbol;
23
- export declare const SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY: symbol;
24
- //# sourceMappingURL=constants.d.ts.map