File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ export { trpcMiddleware } from './trpc';
119
119
export { wrapMcpServerWithSentry } from './mcp-server' ;
120
120
export { captureFeedback } from './feedback' ;
121
121
export type { ReportDialogOptions } from './report-dialog' ;
122
- export { _INTERNAL_captureLog , _INTERNAL_flushLogsBuffer } from './logs/exports' ;
122
+ export { _INTERNAL_captureLog , _INTERNAL_flushLogsBuffer , _INTERNAL_captureSerializedLog } from './logs/exports' ;
123
123
export { consoleLoggingIntegration } from './logs/console-integration' ;
124
124
125
125
export type { FeatureFlag } from './featureFlags' ;
Original file line number Diff line number Diff line change @@ -61,7 +61,16 @@ export function logAttributeToSerializedLogAttribute(value: unknown): Serialized
61
61
}
62
62
}
63
63
64
- function defaultCaptureSerializedLog ( client : Client , serializedLog : SerializedLog ) : void {
64
+ /**
65
+ * Captures a serialized log event and adds it to the log buffer for the given client.
66
+ *
67
+ * @param client - A client. Uses the current client if not provided.
68
+ * @param serializedLog - The serialized log event to capture.
69
+ *
70
+ * @experimental This method will experience breaking changes. This is not yet part of
71
+ * the stable Sentry SDK API and can be changed or removed without warning.
72
+ */
73
+ export function _INTERNAL_captureSerializedLog ( client : Client , serializedLog : SerializedLog ) : void {
65
74
const logBuffer = _INTERNAL_getLogBuffer ( client ) ;
66
75
if ( logBuffer === undefined ) {
67
76
GLOBAL_OBJ . _sentryClientToLogBufferMap ?. set ( client , [ serializedLog ] ) ;
@@ -88,7 +97,7 @@ export function _INTERNAL_captureLog(
88
97
beforeLog : Log ,
89
98
client : Client | undefined = getClient ( ) ,
90
99
scope = getCurrentScope ( ) ,
91
- captureSerializedLog : ( client : Client , log : SerializedLog ) => void = defaultCaptureSerializedLog ,
100
+ captureSerializedLog : ( client : Client , log : SerializedLog ) => void = _INTERNAL_captureSerializedLog ,
92
101
) : void {
93
102
if ( ! client ) {
94
103
DEBUG_BUILD && logger . warn ( 'No client available to capture log.' ) ;
You can’t perform that action at this time.
0 commit comments