Browse Source

test: Add branch and commit sha to jest transactions (#26700)

Scott Cooper 3 years ago
parent
commit
2594009c65
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tests/js/instrumentedEnv/index.js

+ 4 - 0
tests/js/instrumentedEnv/index.js

@@ -43,6 +43,10 @@ class SentryEnvironment extends JsDomEnvironment {
       op: 'jest test suite',
       description: this.testPath,
       name: this.testPath,
+      tags: {
+        branch: process.env.GITHUB_REF,
+        commit: process.env.GITHUB_SHA,
+      },
     });
 
     Sentry.configureScope(scope => scope.setSpan(this.transaction));