Skip to content

Commit dfbb755

Browse files
committed
add comment
1 parent 3598136 commit dfbb755

File tree

1 file changed

+4
-1
lines changed
  • packages/plugins/opentelemetry/src

1 file changed

+4
-1
lines changed

packages/plugins/opentelemetry/src/spans.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,10 @@ export const getOperationFromDocument = (
592592
document,
593593
operationName || undefined,
594594
);
595-
} catch {}
595+
} catch {
596+
// Return undefined if the operation is either not found, or multiple operations exists and no
597+
// operationName has been provided
598+
}
596599

597600
let operationNameMap = operationByDocument.get(document);
598601
if (!operationNameMap) {

0 commit comments

Comments
 (0)