-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into issue-25960
- Loading branch information
Showing
57 changed files
with
3,948 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { telemetry } from '@packages/telemetry/src/browser' | ||
|
||
export const addTelemetryListeners = (Cypress) => { | ||
Cypress.on('test:before:run', (attributes, test) => { | ||
// we emit the 'test:before:run' events within various driver tests | ||
try { | ||
// If a span for a previous test hasn't been ended, end it before starting the new test span | ||
const previousTestSpan = telemetry.findActiveSpan((span) => { | ||
return span.name.startsWith('test:') | ||
}) | ||
|
||
if (previousTestSpan) { | ||
telemetry.endActiveSpanAndChildren(previousTestSpan) | ||
} | ||
|
||
const span = telemetry.startSpan({ name: `test:${test.fullTitle()}`, active: true }) | ||
|
||
span?.setAttributes({ | ||
currentRetry: attributes.currentRetry, | ||
}) | ||
} catch (error) { | ||
// TODO: log error when client side debug logging is available | ||
} | ||
}) | ||
|
||
Cypress.on('test:after:run', (attributes, test) => { | ||
try { | ||
const span = telemetry.getSpan(`test:${test.fullTitle()}`) | ||
|
||
span?.setAttributes({ | ||
timings: JSON.stringify(attributes.timings), | ||
}) | ||
|
||
span?.end() | ||
} catch (error) { | ||
// TODO: log error when client side debug logging is available | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.