@sentry/opentelemetry
Advanced tools
Comparing version
@@ -1,1 +0,1 @@ | ||
{"type":"module","version":"9.25.0","sideEffects":false} | ||
{"type":"module","version":"9.25.1","sideEffects":false} |
import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; | ||
import { TransactionEvent } from '@sentry/core'; | ||
import { SpanNode } from './utils/groupSpansWithParents'; | ||
type SpanNodeCompleted = SpanNode & { | ||
span: ReadableSpan; | ||
}; | ||
/** | ||
@@ -12,2 +16,3 @@ * A Sentry-specific exporter that converts OpenTelemetry Spans to Sentry Spans & Transactions. | ||
private _lastCleanupTimestampInS; | ||
private _sentSpans; | ||
constructor(options?: { | ||
@@ -17,2 +22,15 @@ /** 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. */ | ||
}); | ||
/** | ||
* Check if a span with the given ID has already been sent using the `_sentSpans` as a cache. | ||
* Purges "expired" spans from the cache upon checking. | ||
* @param spanId The span id to check. | ||
* @returns Whether the span is already sent in the past X seconds. | ||
*/ | ||
isSpanAlreadySent(spanId: string): boolean; | ||
/** Remove "expired" span id entries from the _sentSpans cache. */ | ||
flushSentSpanCache(): void; | ||
/** Check if a node is a completed root node or a node whose parent has already been sent */ | ||
nodeIsCompletedRootNode(node: SpanNode): node is SpanNodeCompleted; | ||
/** Get all completed root nodes from a list of nodes */ | ||
getCompletedRootNodes(nodes: SpanNode[]): SpanNodeCompleted[]; | ||
/** Export a single span. */ | ||
@@ -26,5 +44,16 @@ export(span: ReadableSpan): void; | ||
private _clearTimeout; | ||
/** | ||
* Send the given spans, but only if they are part of a finished transaction. | ||
* | ||
* Returns the sent spans. | ||
* Spans remain unsent when their parent span is not yet finished. | ||
* This will happen regularly, as child spans are generally finished before their parents. | ||
* But it _could_ also happen because, for whatever reason, a parent span was lost. | ||
* In this case, we'll eventually need to clean this up. | ||
*/ | ||
private _maybeSend; | ||
} | ||
/** Exported only for tests. */ | ||
export declare function createTransactionForOtelSpan(span: ReadableSpan): TransactionEvent; | ||
export {}; | ||
//# sourceMappingURL=spanExporter.d.ts.map |
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base'; | ||
import type { TransactionEvent } from '@sentry/core'; | ||
import type { SpanNode } from './utils/groupSpansWithParents'; | ||
type SpanNodeCompleted = SpanNode & { | ||
span: ReadableSpan; | ||
}; | ||
/** | ||
@@ -12,2 +16,3 @@ * A Sentry-specific exporter that converts OpenTelemetry Spans to Sentry Spans & Transactions. | ||
private _lastCleanupTimestampInS; | ||
private _sentSpans; | ||
constructor(options?: { | ||
@@ -17,2 +22,15 @@ /** 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. */ | ||
}); | ||
/** | ||
* Check if a span with the given ID has already been sent using the `_sentSpans` as a cache. | ||
* Purges "expired" spans from the cache upon checking. | ||
* @param spanId The span id to check. | ||
* @returns Whether the span is already sent in the past X seconds. | ||
*/ | ||
isSpanAlreadySent(spanId: string): boolean; | ||
/** Remove "expired" span id entries from the _sentSpans cache. */ | ||
flushSentSpanCache(): void; | ||
/** Check if a node is a completed root node or a node whose parent has already been sent */ | ||
nodeIsCompletedRootNode(node: SpanNode): node is SpanNodeCompleted; | ||
/** Get all completed root nodes from a list of nodes */ | ||
getCompletedRootNodes(nodes: SpanNode[]): SpanNodeCompleted[]; | ||
/** Export a single span. */ | ||
@@ -26,5 +44,16 @@ export(span: ReadableSpan): void; | ||
private _clearTimeout; | ||
/** | ||
* Send the given spans, but only if they are part of a finished transaction. | ||
* | ||
* Returns the sent spans. | ||
* Spans remain unsent when their parent span is not yet finished. | ||
* This will happen regularly, as child spans are generally finished before their parents. | ||
* But it _could_ also happen because, for whatever reason, a parent span was lost. | ||
* In this case, we'll eventually need to clean this up. | ||
*/ | ||
private _maybeSend; | ||
} | ||
/** Exported only for tests. */ | ||
export declare function createTransactionForOtelSpan(span: ReadableSpan): TransactionEvent; | ||
export {}; | ||
//# sourceMappingURL=spanExporter.d.ts.map |
{ | ||
"name": "@sentry/opentelemetry", | ||
"version": "9.25.0", | ||
"version": "9.25.1", | ||
"description": "Official Sentry utilities for OpenTelemetry", | ||
@@ -42,3 +42,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "9.25.0" | ||
"@sentry/core": "9.25.1" | ||
}, | ||
@@ -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
540498
2.44%5019
2.66%+ Added
- Removed
Updated