Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9cfe4c7
add TextEncoder and TextDecoder to jsdom test environment
lobsterkatie Aug 18, 2021
37b4944
add TransactionMetadata to DebugMeta type
lobsterkatie Aug 18, 2021
2ec4722
add segment to user type
lobsterkatie Aug 18, 2021
f9ba96c
add TraceHeaders and SpanContext.getTraceHeaders() to types
lobsterkatie Aug 18, 2021
bbf472d
add base64 string functions
lobsterkatie Aug 18, 2021
9474a4e
fix circular dependency
lobsterkatie Aug 19, 2021
6728b26
move setting default environment to SDK initialization rather than ev…
lobsterkatie Aug 18, 2021
0af6717
remove unused traceHeaders function
lobsterkatie Aug 18, 2021
5e57193
polyfill Object.fromEntries for tracing tests
lobsterkatie Aug 18, 2021
5d53567
s/TRACEPARENT_REGEXP/SENTRY_TRACE_REGEX
lobsterkatie Aug 18, 2021
2a50338
s/extractTraceparentData/extractSentrytraceData
lobsterkatie Aug 18, 2021
54ac0d6
s/traceparent/sentrytrace in various spots
lobsterkatie Aug 19, 2021
58eeda9
add functions for computing tracestate and combined tracing headers
lobsterkatie Aug 19, 2021
a758e16
add tracestate header to outgoing requests
lobsterkatie Aug 19, 2021
a007a83
deprecate toTraceparent
lobsterkatie Aug 19, 2021
1a4336e
add extractTracestateData() function
lobsterkatie Aug 19, 2021
fcb41b3
make transactions accept metadata in their incoming transaction context
lobsterkatie Aug 19, 2021
f0f7ed6
propagate incoming tracestate headers
lobsterkatie Aug 19, 2021
9ab5a8f
extract and propagate tracestate data from <meta> tags
lobsterkatie Aug 19, 2021
08d9ba4
add missing tracestate when capturing transaction, if necessary
lobsterkatie Aug 19, 2021
5c6070e
only deal with envelope header data if we're using an envelope
lobsterkatie Aug 19, 2021
50819b6
add tracestate to envelope header
lobsterkatie Aug 19, 2021
756e855
clean up comments
lobsterkatie Aug 19, 2021
a0b5caf
add http header tests
lobsterkatie Aug 19, 2021
f1a0dbf
random cleanup
lobsterkatie Aug 19, 2021
6415a5a
don't stringify event data until the end
lobsterkatie Aug 19, 2021
15a2e85
rework and add request tests
lobsterkatie Aug 19, 2021
dd76840
remove redundant string test, add browser test for non-base64 string
lobsterkatie Aug 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add TraceHeaders and SpanContext.getTraceHeaders() to types
  • Loading branch information
lobsterkatie committed Aug 23, 2021
commit f9ba96c55c9017b3b4d46bb63fc855cbb8187485
2 changes: 1 addition & 1 deletion packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export {
SessionFlusherLike,
} from './session';
export { Severity } from './severity';
export { Span, SpanContext } from './span';
export { Span, SpanContext, TraceHeaders } from './span';
export { StackFrame } from './stackframe';
export { Stacktrace } from './stacktrace';
export { Status } from './status';
Expand Down
13 changes: 13 additions & 0 deletions packages/types/src/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ export interface Span extends SpanContext {
/** Updates the current span with a new `SpanContext` */
updateWithContext(spanContext: SpanContext): this;

/**
* Get headers to attach to any outgoing requests made by the operation corresponding to the current span
*
* @returns An object containing the headers
*/
getTraceHeaders(): TraceHeaders;

/** Convert the object to JSON for w. spans array info only */
getTraceContext(): {
data?: { [key: string]: any };
Expand All @@ -169,6 +176,7 @@ export interface Span extends SpanContext {
tags?: { [key: string]: Primitive };
trace_id: string;
};

/** Convert the object to JSON */
toJSON(): {
data?: { [key: string]: any };
Expand All @@ -183,3 +191,8 @@ export interface Span extends SpanContext {
trace_id: string;
};
}

export type TraceHeaders = {
'sentry-trace': string;
tracestate?: string;
};