Skip to content

Commit d5683f9

Browse files
committed
s/serializedSpan/serializedStreamedSpan
1 parent aa1bfc4 commit d5683f9

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

packages/core/src/tracing/spans/envelope.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import type { Client } from '../../client';
22
import type { DynamicSamplingContext, SpanContainerItem, StreamedSpanEnvelope } from '../../types-hoist/envelope';
3-
import type { SerializedSpan } from '../../types-hoist/span';
3+
import type { SerializedStreamedSpan } from '../../types-hoist/span';
44
import { dsnToString } from '../../utils/dsn';
55
import { createEnvelope, getSdkMetadataForEnvelopeHeader } from '../../utils/envelope';
66

77
/**
88
* Creates a span v2 span streaming envelope
99
*/
1010
export function createStreamedSpanEnvelope(
11-
serializedSpans: Array<SerializedSpan>,
11+
serializedSpans: Array<SerializedStreamedSpan>,
1212
dsc: Partial<DynamicSamplingContext>,
1313
client: Client,
1414
): StreamedSpanEnvelope {

packages/core/src/types-hoist/envelope.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { Profile, ProfileChunk } from './profiling';
1111
import type { ReplayEvent, ReplayRecordingData } from './replay';
1212
import type { SdkInfo } from './sdkinfo';
1313
import type { SerializedSession, SessionAggregates } from './session';
14-
import type { SerializedSpanContainer, SpanJSON } from './span';
14+
import type { SerializedStreamedSpanContainer, SpanJSON } from './span';
1515

1616
// Based on: https://develop.sentry.dev/sdk/envelopes/
1717

@@ -138,7 +138,7 @@ export type FeedbackItem = BaseEnvelopeItem<FeedbackItemHeaders, FeedbackEvent>;
138138
export type ProfileItem = BaseEnvelopeItem<ProfileItemHeaders, Profile>;
139139
export type ProfileChunkItem = BaseEnvelopeItem<ProfileChunkItemHeaders, ProfileChunk>;
140140
export type SpanItem = BaseEnvelopeItem<SpanItemHeaders, Partial<SpanJSON>>;
141-
export type SpanContainerItem = BaseEnvelopeItem<SpanContainerItemHeaders, SerializedSpanContainer>;
141+
export type SpanContainerItem = BaseEnvelopeItem<SpanContainerItemHeaders, SerializedStreamedSpanContainer>;
142142
export type LogContainerItem = BaseEnvelopeItem<LogContainerItemHeaders, SerializedLogContainer>;
143143
export type MetricContainerItem = BaseEnvelopeItem<MetricContainerItemHeaders, SerializedMetricContainer>;
144144
export type RawSecurityItem = BaseEnvelopeItem<RawSecurityHeaders, LegacyCSPReport>;

packages/core/src/types-hoist/span.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export type SpanTimeInput = HrTime | number | Date;
3838
/**
3939
* Intermediate JSON reporesentation of a v2 span, which users and our SDK integrations will interact with.
4040
* This is NOT the final serialized JSON span, but an intermediate step still holding raw attributes.
41-
* The final, serialized span is a {@link SerializedSpan}.
41+
* The final, serialized span is a {@link SerializedStreamedSpan}.
4242
* Main reason: Make it easier and safer for users to work with attributes.
4343
*/
4444
export interface StreamedSpanJSON {
@@ -60,16 +60,16 @@ export interface StreamedSpanJSON {
6060
* The intermediate representation is {@link StreamedSpanJSON}.
6161
* Main difference: Attributes are converted to {@link Attributes}, thus including the `type` annotation.
6262
*/
63-
export type SerializedSpan = Omit<StreamedSpanJSON, 'attributes' | 'links'> & {
63+
export type SerializedStreamedSpan = Omit<StreamedSpanJSON, 'attributes' | 'links'> & {
6464
attributes?: Attributes;
6565
links?: SpanLinkJSON<Attributes>[];
6666
};
6767

6868
/**
6969
* Envelope span item container.
7070
*/
71-
export type SerializedSpanContainer = {
72-
items: Array<SerializedSpan>;
71+
export type SerializedStreamedSpanContainer = {
72+
items: Array<SerializedStreamedSpan>;
7373
};
7474

7575
/** A JSON representation of a span. */

packages/core/test/lib/tracing/spans/envelope.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { describe, expect, it } from 'vitest';
22
import { createStreamedSpanEnvelope } from '../../../../src/tracing/spans/envelope';
33
import type { DynamicSamplingContext } from '../../../../src/types-hoist/envelope';
4-
import type { SerializedSpan } from '../../../../src/types-hoist/span';
4+
import type { SerializedStreamedSpan } from '../../../../src/types-hoist/span';
55
import { getDefaultTestClientOptions, TestClient } from '../../../mocks/client';
66

7-
function createMockSerializedSpan(overrides: Partial<SerializedSpan> = {}): SerializedSpan {
7+
function createMockSerializedSpan(overrides: Partial<SerializedStreamedSpan> = {}): SerializedStreamedSpan {
88
return {
99
trace_id: 'abc123',
1010
span_id: 'def456',

0 commit comments

Comments
 (0)