Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa5b5fb

Browse files
authored
fix(otel): preferential parsing of environment key from span attributes (#9432)
1 parent c084d19 commit aa5b5fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎packages/shared/src/server/otel/OtelIngestionProcessor.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,12 +1131,12 @@ export class OtelIngestionProcessor {
11311131
];
11321132

11331133
for (const key of environmentAttributeKeys) {
1134-
if (resourceAttributes[key]) {
1135-
return resourceAttributes[key] as string;
1136-
}
11371134
if (attributes[key]) {
11381135
return attributes[key] as string;
11391136
}
1137+
if (resourceAttributes[key]) {
1138+
return resourceAttributes[key] as string;
1139+
}
11401140
}
11411141

11421142
return "default";

0 commit comments

Comments
 (0)