Skip to content

Commit 5462fa4

Browse files
committed
fix: tests
Signed-off-by: Lukas Reining <[email protected]>11 Signed-off-by: Lukas Reining <[email protected]>
1 parent ae49b81 commit 5462fa4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libs/hooks/open-telemetry/src/lib/metrics/metrics-hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class MetricsHook extends OpenTelemetryHook implements BaseHook {
8282
[TelemetryAttribute.PROVIDER]: hookContext.providerMetadata.name,
8383
[TelemetryAttribute.VARIANT]: evaluationDetails.variant ?? evaluationDetails.value?.toString(),
8484
[TelemetryAttribute.REASON]: evaluationDetails.reason ?? StandardResolutionReasons.UNKNOWN,
85-
...this.safeAttributeMapper(evaluationDetails?.flagMetadata || {}),
85+
...this.safeAttributeMapper(hookContext, evaluationDetails),
8686
});
8787
}
8888

libs/hooks/open-telemetry/src/lib/traces/tracing-hook.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ describe('OpenTelemetry Hooks', () => {
410410
const finished = memorySpanExporter.getFinishedSpans();
411411
const evalSpan = finished[0];
412412
expect(evalSpan.attributes?.custom).toBe('bar');
413-
expect(evalSpan.attributes?.custom).toBe('user_id');
413+
expect(evalSpan.attributes?.key).toBe('user_id');
414414
});
415415

416416
it('should exclude attribute via excludeAttributes', () => {

0 commit comments

Comments
 (0)