@sentry/opentelemetry 8.0.0-alpha.7 → 8.0.0-alpha.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/opentelemetry",
3
- "version": "8.0.0-alpha.7",
3
+ "version": "8.0.0-alpha.9",
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",
@@ -42,9 +42,9 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@sentry/core": "8.0.0-alpha.7",
46
- "@sentry/types": "8.0.0-alpha.7",
47
- "@sentry/utils": "8.0.0-alpha.7"
45
+ "@sentry/core": "8.0.0-alpha.9",
46
+ "@sentry/types": "8.0.0-alpha.9",
47
+ "@sentry/utils": "8.0.0-alpha.9"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@opentelemetry/api": "^1.0.0",
@@ -1 +1 @@
1
- {"version":3,"file":"getCurrentHub.d.ts","sourceRoot":"","sources":["../../../src/custom/getCurrentHub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,GAAG,EAAuD,MAAM,eAAe,CAAC;AAmBjH;;;GAGG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAgEnC"}
1
+ {"version":3,"file":"getCurrentHub.d.ts","sourceRoot":"","sources":["../../../src/custom/getCurrentHub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,GAAG,EAAgD,MAAM,eAAe,CAAC;AAmB1G;;;GAGG;AACH,wBAAgB,aAAa,IAAI,GAAG,CA6CnC"}
@@ -1,9 +1,9 @@
1
- import type { Context, SpanContext, TextMapGetter, TextMapSetter } from '@opentelemetry/api';
1
+ import type { Context, Span, TextMapGetter, TextMapSetter } from '@opentelemetry/api';
2
2
  import { TraceState, W3CBaggagePropagator } from '@opentelemetry/core';
3
3
  import type { continueTrace } from '@sentry/core';
4
4
  import type { DynamicSamplingContext, PropagationContext } from '@sentry/types';
5
5
  /** Get the Sentry propagation context from a span context. */
6
- export declare function getPropagationContextFromSpanContext(spanContext: SpanContext): PropagationContext;
6
+ export declare function getPropagationContextFromSpan(span: Span): PropagationContext;
7
7
  /**
8
8
  * Injects and extracts `sentry-trace` and `baggage` headers from carriers.
9
9
  */
@@ -37,12 +37,4 @@ export declare function makeTraceState({ parentSpanId, dsc, sampled, }: {
37
37
  * This should be used in addition to `continueTrace` in OTEL-powered environments.
38
38
  */
39
39
  export declare function continueTraceAsRemoteSpan<T>(ctx: Context, options: Parameters<typeof continueTrace>[0], callback: () => T): T;
40
- /**
41
- * OpenTelemetry only knows about SAMPLED or NONE decision,
42
- * but for us it is important to differentiate between unset and unsampled.
43
- *
44
- * Both of these are identified as `traceFlags === TracegFlags.NONE`,
45
- * but we additionally look at a special trace state to differentiate between them.
46
- */
47
- export declare function getSamplingDecision(spanContext: SpanContext): boolean | undefined;
48
40
  //# sourceMappingURL=propagator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"propagator.d.ts","sourceRoot":"","sources":["../../src/propagator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGtG,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAuB,MAAM,qBAAqB,CAAC;AAE5F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,KAAK,EAAE,sBAAsB,EAAW,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAuBzF,8DAA8D;AAC9D,wBAAgB,oCAAoC,CAAC,WAAW,EAAE,WAAW,GAAG,kBAAkB,CAgBjG;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,oBAAoB;IACxD,8FAA8F;IAC9F,OAAO,CAAC,qB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BzF,8DAA8D;AAC9D,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,GAAG,kBAAkB,CAuB5E;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,oBAAoB;IACxD,8FAA8F;IAC9F,OAAO,CAAC,qBAAqB,CAA0B;;IAUvD;;OAEG;IACI,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI;IAgD9E;;OAEG;IACI,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO;IA0BlF;;OAEG;IACI,MAAM,IAAI,MAAM,EAAE;IAIzB,uDAAuD;IACvD,OAAO,CAAC,sBAAsB;CAc/B;AAED,0BAA0B;AAC1B,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,GAAG,EACH,OAAO,GACR,EAAE;IACD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,UAAU,GAAG,SAAS,CAiBzB;AA0GD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EACzC,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,EAC5C,QAAQ,EAAE,MAAM,CAAC,GAChB,CAAC,CAIH"}
@@ -1,14 +1,14 @@
1
1
  import type { Context } from '@opentelemetry/api';
2
2
  import type { Sampler, SamplingResult } from '@opentelemetry/sdk-trace-base';
3
- import type { Client } from '@sentry/types';
3
+ import type { Client, SpanAttributes } from '@sentry/types';
4
4
  /**
5
- * A custom OTEL sampler that uses Sentry sampling rates to make it's decision
5
+ * A custom OTEL sampler that uses Sentry sampling rates to make its decision
6
6
  */
7
7
  export declare class SentrySampler implements Sampler {
8
8
  private _client;
9
9
  constructor(client: Client);
10
10
  /** @inheritDoc */
11
- shouldSample(context: Context, traceId: string, spanName: string, _spanKind: unknown, spanAttributes: unknown, _links: unknown): SamplingResult;
11
+ shouldSample(context: Context, traceId: string, spanName: string, _spanKind: unknown, spanAttributes: SpanAttributes, _links: unknown): SamplingResult;
12
12
  /** Returns the sampler name or short description with the configuration. */
13
13
  toString(): string;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sampler.d.ts","sourceRoot":"","sources":["../../src/sampler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,OAAO,EAAe,MAAM,oBAAoB,CAAC;AAG3E,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG7E,OAAO,KAAK,EAAE,MAAM,EAAkC,MAAM,eAAe,CAAC;AAQ5E;;GAEG;AACH,qBAAa,aAAc,YAAW,OAAO;IAC3C,OAAO,CAAC,OAAO,CAAS;gBAEL,MAAM,EAAE,MAAM;IAKjC,kBAAkB;IACX,YAAY,CACjB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,OAAO,EAClB,cAAc,EAAE,OAAO,EACvB,MAAM,EAAE,OAAO,GACd,cAAc;IA+FjB,4EAA4E;IACrE,QAAQ,IAAI,MAAM;CAG1B"}
1
+ {"version":3,"file":"sampler.d.ts","sourceRoot":"","sources":["../../src/sampler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,OAAO,EAAQ,MAAM,oBAAoB,CAAC;AAGpE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG7E,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAU5D;;GAEG;AACH,qBAAa,aAAc,YAAW,OAAO;IAC3C,OAAO,CAAC,OAAO,CAAS;gBAEL,MAAM,EAAE,MAAM;IAKjC,kBAAkB;IACX,YAAY,CACjB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,OAAO,EAClB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,OAAO,GACd,cAAc;IAgEjB,4EAA4E;IACrE,QAAQ,IAAI,MAAM;CAG1B"}
@@ -20,6 +20,6 @@ export declare class SentrySpanProcessor implements SpanProcessorInterface {
20
20
  */
21
21
  onStart(span: Span, parentContext: Context): void;
22
22
  /** @inheritDoc */
23
- onEnd(span: ReadableSpan): void;
23
+ onEnd(span: Span & ReadableSpan): void;
24
24
  }
25
25
  //# sourceMappingURL=spanProcessor.d.ts.map
@@ -1 +1 @@
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;AAkDjH;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,sBAAsB;IAChE,OAAO,CAAC,SAAS,CAAqB;;IAOtC;;OAEG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxC;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAItC;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI;IASxD,kBAAkB;IACX,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;CAYvC"}
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;AA0DjH;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,sBAAsB;IAChE,OAAO,CAAC,SAAS,CAAqB;;IAOtC;;OAEG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxC;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAItC;;OAEG;IACI,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI;IAIxD,kBAAkB;IACX,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,YAAY,GAAG,IAAI;CAK9C"}
package/types/trace.d.ts CHANGED
@@ -24,10 +24,6 @@ export declare function startSpan<T>(options: OpenTelemetrySpanContext, callback
24
24
  * it may just be a non-recording span if the span is not sampled or if tracing is disabled.
25
25
  */
26
26
  export declare function startSpanManual<T>(options: OpenTelemetrySpanContext, callback: (span: Span, finish: () => void) => T): T;
27
- /**
28
- * @deprecated Use {@link startSpan} instead.
29
- */
30
- export declare const startActiveSpan: typeof startSpan;
31
27
  /**
32
28
  * Creates a span. This span is not set as active, so will not get automatic instrumentation spans
33
29
  * as children or be able to be accessed via `Sentry.getActiveSpan()`.
@@ -1 +1 @@
1
- {"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../src/trace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAoC,MAAM,oBAAoB,CAAC;AAK1F,OAAO,EAGL,aAAa,IAAI,iBAAiB,EAOnC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,eAAe,CAAC;AAGnD,OAAO,KAAK,EAAuB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAI7E;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,CAAC,GAAG,CAAC,CAyB9F;AAED;;;;;;;;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E,MAAM,EAAE,MAAM,IAAI,KAAK,CAAC,GAC9C,CAAC,CAwBH;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAgBzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,CAGrF;AAwHD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAIvG"}
@@ -1 +1 @@
1
- {"version":3,"file":"dynamicSamplingContext.d.ts","sourceRoot":"","sources":["../../../src/utils/dynamicSamplingContext.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAI5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAyC/G"}
1
+ {"version":3,"file":"dynamicSamplingContext.d.ts","sourceRoot":"","sources":["../../../src/utils/dynamicSamplingContext.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAG5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAK7C;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CA2C/G"}
@@ -0,0 +1,10 @@
1
+ import type { SpanContext } from '@opentelemetry/api';
2
+ /**
3
+ * OpenTelemetry only knows about SAMPLED or NONE decision,
4
+ * but for us it is important to differentiate between unset and unsampled.
5
+ *
6
+ * Both of these are identified as `traceFlags === TracegFlags.NONE`,
7
+ * but we additionally look at a special trace state to differentiate between them.
8
+ */
9
+ export declare function getSamplingDecision(spanContext: SpanContext): boolean | undefined;
10
+ //# sourceMappingURL=getSamplingDecision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSamplingDecision.d.ts","sourceRoot":"","sources":["../../../src/utils/getSamplingDecision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKtD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,GAAG,SAAS,CA6BjF"}
@@ -1,9 +1,9 @@
1
- import { Context, SpanContext, TextMapGetter, TextMapSetter } from '@opentelemetry/api';
1
+ import { Context, Span, TextMapGetter, TextMapSetter } from '@opentelemetry/api';
2
2
  import { TraceState, W3CBaggagePropagator } from '@opentelemetry/core';
3
3
  import { continueTrace } from '@sentry/core';
4
4
  import { DynamicSamplingContext, PropagationContext } from '@sentry/types';
5
5
  /** Get the Sentry propagation context from a span context. */
6
- export declare function getPropagationContextFromSpanContext(spanContext: SpanContext): PropagationContext;
6
+ export declare function getPropagationContextFromSpan(span: Span): PropagationContext;
7
7
  /**
8
8
  * Injects and extracts `sentry-trace` and `baggage` headers from carriers.
9
9
  */
@@ -37,12 +37,4 @@ export declare function makeTraceState({ parentSpanId, dsc, sampled, }: {
37
37
  * This should be used in addition to `continueTrace` in OTEL-powered environments.
38
38
  */
39
39
  export declare function continueTraceAsRemoteSpan<T>(ctx: Context, options: Parameters<typeof continueTrace>[0], callback: () => T): T;
40
- /**
41
- * OpenTelemetry only knows about SAMPLED or NONE decision,
42
- * but for us it is important to differentiate between unset and unsampled.
43
- *
44
- * Both of these are identified as `traceFlags === TracegFlags.NONE`,
45
- * but we additionally look at a special trace state to differentiate between them.
46
- */
47
- export declare function getSamplingDecision(spanContext: SpanContext): boolean | undefined;
48
40
  //# sourceMappingURL=propagator.d.ts.map
@@ -1,14 +1,14 @@
1
1
  import { Context } from '@opentelemetry/api';
2
2
  import { Sampler, SamplingResult } from '@opentelemetry/sdk-trace-base';
3
- import { Client } from '@sentry/types';
3
+ import { Client, SpanAttributes } from '@sentry/types';
4
4
  /**
5
- * A custom OTEL sampler that uses Sentry sampling rates to make it's decision
5
+ * A custom OTEL sampler that uses Sentry sampling rates to make its decision
6
6
  */
7
7
  export declare class SentrySampler implements Sampler {
8
8
  private _client;
9
9
  constructor(client: Client);
10
10
  /** @inheritDoc */
11
- shouldSample(context: Context, traceId: string, spanName: string, _spanKind: unknown, spanAttributes: unknown, _links: unknown): SamplingResult;
11
+ shouldSample(context: Context, traceId: string, spanName: string, _spanKind: unknown, spanAttributes: SpanAttributes, _links: unknown): SamplingResult;
12
12
  /** Returns the sampler name or short description with the configuration. */
13
13
  toString(): string;
14
14
  }
@@ -20,6 +20,6 @@ export declare class SentrySpanProcessor implements SpanProcessorInterface {
20
20
  */
21
21
  onStart(span: Span, parentContext: Context): void;
22
22
  /** @inheritDoc */
23
- onEnd(span: ReadableSpan): void;
23
+ onEnd(span: Span & ReadableSpan): void;
24
24
  }
25
25
  //# sourceMappingURL=spanProcessor.d.ts.map
@@ -24,10 +24,6 @@ export declare function startSpan<T>(options: OpenTelemetrySpanContext, callback
24
24
  * it may just be a non-recording span if the span is not sampled or if tracing is disabled.
25
25
  */
26
26
  export declare function startSpanManual<T>(options: OpenTelemetrySpanContext, callback: (span: Span, finish: () => void) => T): T;
27
- /**
28
- * @deprecated Use {@link startSpan} instead.
29
- */
30
- export declare const startActiveSpan: typeof startSpan;
31
27
  /**
32
28
  * Creates a span. This span is not set as active, so will not get automatic instrumentation spans
33
29
  * as children or be able to be accessed via `Sentry.getActiveSpan()`.
@@ -0,0 +1,10 @@
1
+ import { SpanContext } from '@opentelemetry/api';
2
+ /**
3
+ * OpenTelemetry only knows about SAMPLED or NONE decision,
4
+ * but for us it is important to differentiate between unset and unsampled.
5
+ *
6
+ * Both of these are identified as `traceFlags === TracegFlags.NONE`,
7
+ * but we additionally look at a special trace state to differentiate between them.
8
+ */
9
+ export declare function getSamplingDecision(spanContext: SpanContext): boolean | undefined;
10
+ //# sourceMappingURL=getSamplingDecision.d.ts.map