@sentry/opentelemetry
Advanced tools
Comparing version
@@ -1,1 +0,1 @@ | ||
{"type":"module","version":"8.46.0","sideEffects":false} | ||
{"type":"module","version":"8.47.0","sideEffects":false} |
@@ -14,6 +14,10 @@ import { AttributeValue, Attributes } from '@opentelemetry/api'; | ||
*/ | ||
export declare function inferSpanData(name: string, attributes: SpanAttributes, kind: SpanKind): SpanDescription; | ||
export declare function inferSpanData(spanName: string, attributes: SpanAttributes, kind: SpanKind): SpanDescription; | ||
/** | ||
* Extract better op/description from an otel span. | ||
* | ||
* Does not overwrite the span name if the source is already set to custom to ensure | ||
* that user-updated span names are preserved. In this case, we only adjust the op but | ||
* leave span description and source unchanged. | ||
* | ||
* Based on https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7422ce2a06337f68a59b552b8c5a2ac125d6bae5/exporter/sentryexporter/sentry_exporter.go#L306 | ||
@@ -36,3 +40,19 @@ */ | ||
}; | ||
/** | ||
* Because Otel instrumentation sometimes mutates span names via `span.updateName`, the only way | ||
* to ensure that a user-set span name is preserved is to store it as a tmp attribute on the span. | ||
* We delete this attribute once we're done with it when preparing the event envelope. | ||
* | ||
* This temp attribute always takes precedence over the original name. | ||
* | ||
* We also need to take care of setting the correct source. Users can always update the source | ||
* after updating the name, so we need to respect that. | ||
* | ||
* @internal exported only for testing | ||
*/ | ||
export declare function getUserUpdatedNameAndSource(originalName: string, attributes: Attributes, fallbackSource?: TransactionSource): { | ||
description: string; | ||
source: TransactionSource; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=parseSpanDescription.d.ts.map |
@@ -14,6 +14,10 @@ import type { AttributeValue, Attributes } from '@opentelemetry/api'; | ||
*/ | ||
export declare function inferSpanData(name: string, attributes: SpanAttributes, kind: SpanKind): SpanDescription; | ||
export declare function inferSpanData(spanName: string, attributes: SpanAttributes, kind: SpanKind): SpanDescription; | ||
/** | ||
* Extract better op/description from an otel span. | ||
* | ||
* Does not overwrite the span name if the source is already set to custom to ensure | ||
* that user-updated span names are preserved. In this case, we only adjust the op but | ||
* leave span description and source unchanged. | ||
* | ||
* Based on https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7422ce2a06337f68a59b552b8c5a2ac125d6bae5/exporter/sentryexporter/sentry_exporter.go#L306 | ||
@@ -36,3 +40,19 @@ */ | ||
}; | ||
/** | ||
* Because Otel instrumentation sometimes mutates span names via `span.updateName`, the only way | ||
* to ensure that a user-set span name is preserved is to store it as a tmp attribute on the span. | ||
* We delete this attribute once we're done with it when preparing the event envelope. | ||
* | ||
* This temp attribute always takes precedence over the original name. | ||
* | ||
* We also need to take care of setting the correct source. Users can always update the source | ||
* after updating the name, so we need to respect that. | ||
* | ||
* @internal exported only for testing | ||
*/ | ||
export declare function getUserUpdatedNameAndSource(originalName: string, attributes: Attributes, fallbackSource?: TransactionSource): { | ||
description: string; | ||
source: TransactionSource; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=parseSpanDescription.d.ts.map |
{ | ||
"name": "@sentry/opentelemetry", | ||
"version": "8.46.0", | ||
"version": "8.47.0", | ||
"description": "Official Sentry utilities for OpenTelemetry", | ||
@@ -42,3 +42,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "8.46.0" | ||
"@sentry/core": "8.47.0" | ||
}, | ||
@@ -45,0 +45,0 @@ "peerDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1023609
3.14%4974
3.11%+ Added
- Removed
Updated