Skip to content

Commit 74ec85a

Browse files
committed
Clean up record Error
1 parent 5e5b5f7 commit 74ec85a

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

sdk/@launchdarkly/observability-react-native/src/client/ObservabilityClient.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,11 @@ export class ObservabilityClient {
8383

8484
public consumeCustomError(
8585
error: Error,
86-
secureSessionId?: string,
87-
requestId?: string,
88-
metadata?: Attributes,
86+
attributes?: Attributes,
8987
options?: { span: OtelSpan },
9088
): void {
9189
if (!this.options.enableErrorTracking) return
9290

93-
// Combine metadata with session/request context
94-
const attributes = {
95-
...metadata,
96-
...(secureSessionId && { 'session.id': secureSessionId }),
97-
...(requestId && { 'request.id': requestId }),
98-
}
99-
10091
this.instrumentationManager.recordError(error, attributes, options)
10192
}
10293

sdk/@launchdarkly/observability-react-native/src/sdk/LDObserve.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,11 @@ export const _LDObserve = {
2828

2929
recordError: (
3030
error: Error,
31-
secureSessionId?: string,
32-
requestId?: string,
33-
metadata?: Attributes,
31+
attributes?: Attributes,
3432
options?: { span: OtelSpan },
3533
) => {
3634
try {
37-
observabilityClient?.consumeCustomError(
38-
error,
39-
secureSessionId,
40-
requestId,
41-
metadata,
42-
options,
43-
)
35+
observabilityClient?.consumeCustomError(error, attributes, options)
4436
} catch (e) {
4537
console.warn('observability-react-native consumeError error: ', e)
4638
}

0 commit comments

Comments
 (0)