@sentry/opentelemetry 8.46.0 → 8.47.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/build/cjs/index.js +79 -15
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +80 -16
- package/build/esm/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/types/spanExporter.d.ts.map +1 -1
- package/build/types/utils/parseSpanDescription.d.ts +21 -1
- package/build/types/utils/parseSpanDescription.d.ts.map +1 -1
- package/build/types-ts3.8/utils/parseSpanDescription.d.ts +21 -1
- package/package.json +2 -2
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"8.
|
|
1
|
+
{"type":"module","version":"8.47.0","sideEffects":false}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAmCtB;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,aAAa,CAA4C;IAkBjE,OAAO,CAAC,oBAAoB,CAAqC;IACjE,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,mBAAmB,CAA4C;IACvE,OAAO,CAAC,wBAAwB,CAAS;gBAEtB,OAAO,CAAC,EAAE;QAC3B,4IAA4I;QAC5I,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IAOD,4BAA4B;IACrB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAyCvC,kDAAkD;IAC3C,KAAK,IAAI,IAAI;IA6BpB,0BAA0B;IACnB,KAAK,IAAI,IAAI;IAKpB,+BAA+B;IAC/B,OAAO,CAAC,aAAa;CAMtB;AAiED,+BAA+B;AAC/B,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,YAAY,GAAG,gBAAgB,CAqEjF"}
|
|
@@ -11,10 +11,14 @@ interface SpanDescription {
|
|
|
11
11
|
/**
|
|
12
12
|
* Infer the op & description for a set of name, attributes and kind of a span.
|
|
13
13
|
*/
|
|
14
|
-
export declare function inferSpanData(
|
|
14
|
+
export declare function inferSpanData(spanName: string, attributes: SpanAttributes, kind: SpanKind): SpanDescription;
|
|
15
15
|
/**
|
|
16
16
|
* Extract better op/description from an otel span.
|
|
17
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
|
+
*
|
|
18
22
|
* Based on https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7422ce2a06337f68a59b552b8c5a2ac125d6bae5/exporter/sentryexporter/sentry_exporter.go#L306
|
|
19
23
|
*/
|
|
20
24
|
export declare function parseSpanDescription(span: AbstractSpan): SpanDescription;
|
|
@@ -32,5 +36,21 @@ export declare function getSanitizedUrl(attributes: Attributes, kind: SpanKind):
|
|
|
32
36
|
fragment: string | undefined;
|
|
33
37
|
hasRoute: boolean;
|
|
34
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
|
+
};
|
|
35
55
|
export {};
|
|
36
56
|
//# sourceMappingURL=parseSpanDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseSpanDescription.d.ts","sourceRoot":"","sources":["../../../src/utils/parseSpanDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAc9C,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"parseSpanDescription.d.ts","sourceRoot":"","sources":["../../../src/utils/parseSpanDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAc9C,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAWtE,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,CAMxE;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,CA4EjB;AAkBD,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"}
|
|
@@ -11,10 +11,14 @@ interface SpanDescription {
|
|
|
11
11
|
/**
|
|
12
12
|
* Infer the op & description for a set of name, attributes and kind of a span.
|
|
13
13
|
*/
|
|
14
|
-
export declare function inferSpanData(
|
|
14
|
+
export declare function inferSpanData(spanName: string, attributes: SpanAttributes, kind: SpanKind): SpanDescription;
|
|
15
15
|
/**
|
|
16
16
|
* Extract better op/description from an otel span.
|
|
17
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
|
+
*
|
|
18
22
|
* Based on https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7422ce2a06337f68a59b552b8c5a2ac125d6bae5/exporter/sentryexporter/sentry_exporter.go#L306
|
|
19
23
|
*/
|
|
20
24
|
export declare function parseSpanDescription(span: AbstractSpan): SpanDescription;
|
|
@@ -32,5 +36,21 @@ export declare function getSanitizedUrl(attributes: Attributes, kind: SpanKind):
|
|
|
32
36
|
fragment: string | undefined;
|
|
33
37
|
hasRoute: boolean;
|
|
34
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
|
+
};
|
|
35
55
|
export {};
|
|
36
56
|
//# sourceMappingURL=parseSpanDescription.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/opentelemetry",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.47.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",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@sentry/core": "8.
|
|
42
|
+
"@sentry/core": "8.47.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@opentelemetry/api": "^1.9.0",
|