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';
119119export { wrapMcpServerWithSentry } from './mcp-server' ;
120120export { captureFeedback } from './feedback' ;
121121export 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' ;
123123export { consoleLoggingIntegration } from './logs/console-integration' ;
124124
125125export type { FeatureFlag } from './featureFlags' ;
Original file line number Diff line number Diff line change @@ -61,7 +61,16 @@ export function logAttributeToSerializedLogAttribute(value: unknown): Serialized
6161 }
6262}
6363
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 {
6574 const logBuffer = _INTERNAL_getLogBuffer ( client ) ;
6675 if ( logBuffer === undefined ) {
6776 GLOBAL_OBJ . _sentryClientToLogBufferMap ?. set ( client , [ serializedLog ] ) ;
@@ -88,7 +97,7 @@ export function _INTERNAL_captureLog(
8897 beforeLog : Log ,
8998 client : Client | undefined = getClient ( ) ,
9099 scope = getCurrentScope ( ) ,
91- captureSerializedLog : ( client : Client , log : SerializedLog ) => void = defaultCaptureSerializedLog ,
100+ captureSerializedLog : ( client : Client , log : SerializedLog ) => void = _INTERNAL_captureSerializedLog ,
92101) : void {
93102 if ( ! client ) {
94103 DEBUG_BUILD && logger . warn ( 'No client available to capture log.' ) ;
You can’t perform that action at this time.
0 commit comments