-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [RUMF-937] create the rum-slim package * [RUMF-937] add rum-slim to the sandbox * ✅ run some e2e tests using rum-slim * remove ProvidedSource export * ✅ do not run rum-slim with a npm setup
- Loading branch information
1 parent
3494806
commit 7a71014
Showing
20 changed files
with
200 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* | ||
!/bundle/datadog-rum.js | ||
!/cjs/**/* | ||
!/esm/**/* | ||
!/src/**/* |
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,2 @@ | ||
save-exact true | ||
|
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 @@ | ||
../rum/BROWSER_SUPPORT.md |
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,10 @@ | ||
# RUM Browser Monitoring - slim package | ||
|
||
## Overview | ||
|
||
This package is equivalent to the [RUM package](../rum), but without support for Session Replay | ||
recording. | ||
|
||
## Setup | ||
|
||
See the [RUM package](../rum/README.md) documentation. |
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,24 @@ | ||
{ | ||
"name": "@datadog/browser-rum-slim", | ||
"version": "2.17.0", | ||
"license": "Apache-2.0", | ||
"main": "cjs/index.js", | ||
"module": "esm/index.js", | ||
"types": "cjs/index.d.ts", | ||
"scripts": { | ||
"build": "run-p build:cjs build:esm build:bundle", | ||
"build:bundle": "rm -rf bundle && webpack --mode=production", | ||
"build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json", | ||
"build:esm": "rm -rf esm && tsc -p tsconfig.esm.json" | ||
}, | ||
"dependencies": { | ||
"@datadog/browser-core": "2.17.0", | ||
"@datadog/browser-rum-core": "2.17.0", | ||
"tslib": "^1.10.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/DataDog/browser-sdk.git", | ||
"directory": "packages/rum-slim" | ||
} | ||
} |
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,9 @@ | ||
import { defineGlobal, getGlobalObject } from '@datadog/browser-core' | ||
import { makeRumPublicApi, RumPublicApi, startRum } from '@datadog/browser-rum-core' | ||
|
||
export const datadogRum = makeRumPublicApi(startRum) | ||
|
||
interface BrowserWindow extends Window { | ||
DD_RUM?: RumPublicApi | ||
} | ||
defineGlobal(getGlobalObject<BrowserWindow>(), 'DD_RUM', datadogRum) |
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,24 @@ | ||
// Keep the following in sync with packages/rum/src/index.ts | ||
export { datadogRum } from './boot/rumSlim.entry' | ||
export { | ||
CommonProperties, | ||
RumPublicApi as RumGlobal, | ||
RumInitConfiguration, | ||
RumUserConfiguration, | ||
// Events | ||
RumEvent, | ||
RumActionEvent, | ||
RumErrorEvent, | ||
RumLongTaskEvent, | ||
RumResourceEvent, | ||
RumViewEvent, | ||
// Events context | ||
RumEventDomainContext, | ||
RumViewEventDomainContext, | ||
RumErrorEventDomainContext, | ||
RumActionEventDomainContext, | ||
RumFetchResourceEventDomainContext, | ||
RumXhrResourceEventDomainContext, | ||
RumOtherResourceEventDomainContext, | ||
RumLongTaskEventDomainContext, | ||
} from '@datadog/browser-rum-core' |
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,11 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"declaration": true, | ||
"module": "commonjs", | ||
"outDir": "./cjs/" | ||
}, | ||
"include": ["./src/**/*.ts"], | ||
"exclude": ["./src/**/*.spec.ts"] | ||
} |
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,11 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"declaration": true, | ||
"module": "es6", | ||
"outDir": "./esm/" | ||
}, | ||
"include": ["./src/**/*.ts"], | ||
"exclude": ["./src/**/*.spec.ts"] | ||
} |
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,9 @@ | ||
const path = require('path') | ||
|
||
const webpackBase = require('../../webpack.base') | ||
|
||
const entry = path.resolve(__dirname, 'src/boot/rumSlim.entry.ts') | ||
|
||
module.exports = (_env, argv) => [ | ||
webpackBase({ mode: argv.mode, entry, datacenter: 'us', filename: 'datadog-rum-slim.js' }), | ||
] |
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
Oops, something went wrong.