File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
packages/core/src/telemetry Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
12
12
import { Resource } from '@opentelemetry/resources'
13
13
import { ReadableSpan , SpanExporter } from '@opentelemetry/sdk-trace-node'
14
14
import { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions'
15
+ import { captureException } from '@sentry/node'
15
16
import { z } from 'zod'
16
17
import { ATTR_LATITUDE_INTERNAL , Otlp } from '../browser'
17
18
import { enqueueSpans } from '../services/tracing/spans/enqueue'
@@ -48,9 +49,16 @@ class InternalExporter implements SpanExporter {
48
49
enqueueSpans ( { spans : this . convert ( spans ) } )
49
50
. then ( ( r ) => r . unwrap ( ) )
50
51
. then ( ( ) => callback ( { code : ExportResultCode . SUCCESS } ) )
51
- . catch ( ( error : Error ) =>
52
- callback ( { code : ExportResultCode . FAILED , error } ) ,
53
- )
52
+ . catch ( ( error : Error ) => {
53
+ // TODO(tracing): temporal error logging
54
+ console . error ( error )
55
+ try {
56
+ captureException ( error )
57
+ } catch {
58
+ // noop
59
+ }
60
+ callback ( { code : ExportResultCode . FAILED , error } )
61
+ } )
54
62
}
55
63
56
64
shutdown ( ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments