Skip to content

Commit

Permalink
Merge pull request #57 from clouDr-f2e/dev
Browse files Browse the repository at this point in the history
refactor: window上暴露sessionId,以便与别的系统交互
  • Loading branch information
Chryseis authored Jan 26, 2022
2 parents e503bf4 + 957d4b4 commit 28e6ffc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/web-performance/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class WebVitals implements IWebVitals {
this.immediately = immediately

const sessionId = generateUniqueID()
window.__monitor_sessionId__ = sessionId
reporter = createReporter(sessionId, appId, version, reportCallback)
metricsStore = new MetricsStore()

Expand Down
1 change: 1 addition & 0 deletions packages/web-performance/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,6 @@ declare global {
// Build flags:
__monitor_xhr__: boolean
__monitor_fetch__: boolean
__monitor_sessionId__: string
}
}

0 comments on commit 28e6ffc

Please sign in to comment.