Skip to content

Commit 36c16bd

Browse files
committed
Support 'otel.scope.name' tag
1 parent d1aa44a commit 36c16bd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/jaeger-ui/src/utils/getSpanDataForDigma.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface IDigmaSpanData {
1515

1616
const getSpanDataForDigma = (span: Span, withEnvironmentId: boolean | undefined = false): IDigmaSpanData => {
1717
const tagsToGet = {
18-
instrumentationLibrary: 'otel.library.name',
18+
instrumentationLibrary: ['otel.library.name', 'otel.scope.name'],
1919
function: 'code.function',
2020
namespace: 'code.namespace',
2121
spanCodeObjectId: 'digma.span.code.object.id',
@@ -28,7 +28,9 @@ const getSpanDataForDigma = (span: Span, withEnvironmentId: boolean | undefined
2828
};
2929

3030
const tagsValues = Object.entries(tagsToGet).reduce((acc, [key, value]) => {
31-
const tag = span.tags.find((x: any) => x.key === value);
31+
const tag = span.tags.find((x: any) =>
32+
Array.isArray(value) ? value.find(v => x.key === v) : x.key === value
33+
);
3234
return tag ? { ...acc, [key]: tag.value } : acc;
3335
}, {});
3436

0 commit comments

Comments
 (0)