Skip to content

Commit 5053669

Browse files
authored
Merge pull request #4 from flashcatcloud/flashcat
Flashcat
2 parents b09d482 + 11d8f6c commit 5053669

17 files changed

Lines changed: 42 additions & 138 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ assignees: ''
77
---
88

99
<!-- Guidelines -->
10-
<!-- Please check if an issue does not exist already for it: https://github.com/DataDog/browser-sdk/issues -->
10+
<!-- Please check if an issue does not exist already for it: https://github.com/flashcatcloud/browser-sdk/issues -->
1111
<!-- Please check if the issue happens with latest version -->
1212

1313
**Describe the bug**

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ labels: enhancement
66
assignees: ''
77
---
88

9-
Please contact [support](https://www.datadoghq.com/support/) to open a feature request.
9+
Please contact [support](https://flashcat.cloud/about/) to open a feature request.

.github/ISSUE_TEMPLATE/support-needed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ assignees: ''
77
---
88

99
<!-- Guidelines -->
10-
<!-- Please check if an issue does not exist already for it: https://github.com/DataDog/browser-sdk/issues -->
10+
<!-- Please check if an issue does not exist already for it: https://github.com/flashcatcloud/browser-sdk/issues -->
1111
<!-- Please check if the issue happens with latest version -->
1212

1313
**What are you trying to achieve and what is your issue? Please describe.**

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717

1818
---
1919

20-
I have gone over the [contributing](https://github.com/DataDog/browser-sdk/blob/main/CONTRIBUTING.md) documentation.
20+
I have gone over the [contributing](https://github.com/flashcatcloud/browser-sdk/blob/main/CONTRIBUTING.md) documentation.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ label our Commit messages and Pull Request titles:
6363

6464
👌 - Updating code due to code review changes.
6565

66-
[1]: https://docs.datadoghq.com/help/
66+
[1]: https://flashcat.cloud/contact/
6767
[2]: https://gitmoji.carloscuesta.me/

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Collect and send browser data to Flashcat.
44

55
## Getting Started
66

7-
See the dedicated [Flashcat Browser RUM Collection documentation][18] to learn how to send RUM data from your browser application to Datadog.
7+
See the dedicated [Flashcat Browser RUM Collection documentation][18] to learn how to send RUM data from your browser application to Flashcat.
88

99
## npm packages
1010

@@ -19,6 +19,9 @@ This repository contains several packages:
1919
| browser-worker | [![npm version][61]][62] | [![bundle size][63]][64] |
2020
| browser-core | [![npm version][41]][42] | [![bundle size][43]][44] |
2121

22+
## CDN bundle
23+
24+
https://static.flashcat.cloud/browser-sdk/v0/flashcat-rum.js
2225

2326
## License Information
2427

@@ -28,7 +31,7 @@ This project is modified and distributed by flashcat under the Apache License 2.
2831

2932
For complete license information, please refer to the [LICENSE](./LICENSE) file.
3033

31-
[18]: https://docs.flashcat.cloud/
34+
[18]: https://docs.flashcat.cloud/zh/flashduty/rum/introduction
3235

3336
[01]: https://badge.fury.io/js/%40flashcatcloud%2Fbrowser-logs.svg
3437
[02]: https://badge.fury.io/js/%40flashcatcloud%2Fbrowser-logs

developer-extension/README.md

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,3 @@
11
# Browser SDK developer extension
22

33
Browser extension to investigate your Browser SDK integration.
4-
5-
## Getting started
6-
7-
### From the Chrome Web Store
8-
9-
The extension is available to **Datadog employees** on the [Chrome Web Store](https://chrome.google.com/webstore/detail/datadog-browser-sdk-devel/boceobohkgenpcpogecpjlnmnfbdigda).
10-
11-
### By loading the extension unpacked
12-
13-
The packed extension is not (yet?) published publicly. You will need to clone this repository and
14-
build the extension manually.
15-
16-
```
17-
$ git clone https://github.com/DataDog/browser-sdk
18-
$ cd browser-sdk
19-
$ yarn
20-
$ yarn build
21-
```
22-
23-
Then, in Google Chrome:
24-
25-
- Open the _Extension Management_ page by navigating to [chrome://extensions](chrome://extensions).
26-
- Enable _Developer Mode_ by clicking the toggle switch next to _Developer mode_.
27-
- Click the _LOAD UNPACKED_ button and select the `browser-sdk/developer-extension/dist`
28-
directory.
29-
- Open devtools and the extension features are located on the `Browser SDK` panel.
30-
31-
## Features
32-
33-
- Log events sent by the SDK in the devtools console
34-
- Flush buffered events
35-
- End current session
36-
- Load the SDK development bundles instead of production ones
37-
- Switch between `rum` and `rum-slim` bundles
38-
- Retrieve Logs/RUM configuration
39-
40-
## Browser compatibility
41-
42-
For now, only Google Chrome is supported.
43-
44-
## Usage tips
45-
46-
### Event Tab
47-
48-
The Event Tab contains a list of events sent by the SDK and a menu of event types for quick filtering.
49-
50-
#### Search syntax
51-
52-
We support a basic `key:value` search syntax, which means you can search within the limits of [RUM event structures](https://docs.datadoghq.com/real_user_monitoring/explorer/search/), such as `action.target.name:action_name`.
53-
54-
We split each search key based on whitespace. To search with multiple conditions, simply add whitespace characters in between, such as:
55-
56-
```
57-
type:view application.id:2 action.target.name:my_action_name
58-
```
59-
60-
#### Event columns
61-
62-
The Events List offers an interactive experience to visualize RUM events:
63-
64-
- Drag and drop to reorder columns in the event list
65-
- Remove (by clicking on `x` in the column title) or add new columns:
66-
- Add a new column from searching for a field by clicking on the `+column` icon at the right side of the header row.
67-
- Add a new column from values in existing columns by right clicking on any attribute in the event json.
68-
- Copy queries and objects from the list by clicking on any cell
69-
70-
### Info Tab
71-
72-
**⚠️Don’t forget to reset everything in the Info Tab after experimenting.**
73-
74-
Info tab contains information about Session and RUM SDK configurations
75-
76-
- **RUM/LOGS Configuration**: edit configuration files on the fly. When configuration changes apply, the extension will automatically reload the page. But for some configurations you might want to click on End Current Session to ensure that the changes kicked in.
77-
- **End current session**: manually end the current session within the extension. This will also end the current replay session.
78-
79-
### Setting Tab
80-
81-
> [!IMPORTANT]
82-
> Don’t forget to reset everything in the Setting Tab after experimenting.
83-
84-
- **Request Interception**: override the current SDK bundle with local build, or ​​switch between `rum` and `rum-slim` bundles on any site that is using RUM SDK. (note: if the SDK is installed from NPM, this override might not work, as it is still in an experimental stage.)
85-
86-
- **Debug Mode**: This option enables debug mode from the developer extension to display errors happening in RUM and LOGS in the developer console.
87-
88-
## Contribution tips
89-
90-
To work on the developer extension and debug it easily:
91-
92-
1. In a terminal, cd into the `developer-extension` folder.
93-
94-
2. Run `yarn dev`.
95-
96-
3. In Chrome, load the `developer-extension/dist` folder as an unpacked extension.
97-
98-
4. After you make a change, right-click on the extension UI and “Reload frame”.

developer-extension/src/panel/monitoring.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { flashcatRum } from '@flashcatcloud/browser-rum'
2-
import { datadogLogs } from '@flashcatcloud/browser-logs'
2+
import { flashcatLogs } from '@flashcatcloud/browser-logs'
33
import packageJson from '../../package.json'
44
import { DEFAULT_PANEL_TAB } from '../common/panelTabConstants'
55

66
export function initMonitoring() {
77
flashcatRum.init({
88
applicationId: '235202fa-3da1-4aeb-abc4-d01b10ca1539',
99
clientToken: 'pub74fd472504982beb427b647893758040',
10-
// site: 'flashcat.cloud',
1110
service: 'browser-sdk-developer-extension',
1211
env: 'prod',
1312
version: packageJson.version,
@@ -24,9 +23,8 @@ export function initMonitoring() {
2423
flashcatRum.startSessionReplayRecording()
2524
flashcatRum.startView(DEFAULT_PANEL_TAB)
2625

27-
datadogLogs.init({
26+
flashcatLogs.init({
2827
clientToken: 'pub74fd472504982beb427b647893758040',
29-
site: 'browser.flashcat.cloud',
3028
service: 'browser-sdk-developer-extension',
3129
env: 'prod',
3230
version: packageJson.version,

packages/core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# `core`
22

3-
Datadog browser core utilities.
3+
Flashcat browser core utilities.

packages/logs/README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,39 @@
11
# Browser Log Collection
22

3-
Send logs to Datadog from web browser pages with the browser logs SDK.
3+
Send logs to Flashcat from web browser pages with the browser logs SDK.
44

5-
See the [dedicated datadog documentation][1] for more details.
65

76
## Usage
87

98
After adding [`@flashcatcloud/browser-logs`][2] to your `package.json` file, initialize it with:
109

1110
```javascript
12-
import { datadogLogs } from '@flashcatcloud/browser-logs'
11+
import { flashcatLogs } from '@flashcatcloud/browser-logs'
1312

14-
datadogLogs.init({
15-
clientToken: '<DATADOG_CLIENT_TOKEN>',
16-
site: '<DATADOG_SITE>',
13+
flashcatLogs.init({
14+
clientToken: '<FC_CLIENT_TOKEN>',
15+
site: '<FC_SITE>',
1716
forwardErrorsToLogs: true,
1817
sessionSampleRate: 100,
1918
})
2019
```
2120

22-
After the Datadog browser logs SDK is initialized, send custom log entries directly to Datadog:
21+
After the Flashcat browser logs SDK is initialized, send custom log entries directly to Flashcat:
2322

2423
```javascript
25-
import { datadogLogs } from '@flashcatcloud/browser-logs'
24+
import { flashcatLogs } from '@flashcatcloud/browser-logs'
2625

27-
datadogLogs.logger.info('Button clicked', { name: 'buttonName', id: 123 })
26+
flashcatLogs.logger.info('Button clicked', { name: 'buttonName', id: 123 })
2827

2928
try {
3029
...
3130
throw new Error('Wrong behavior')
3231
...
3332
} catch (ex) {
34-
datadogLogs.logger.error('Error occurred', { team: 'myTeam' }, ex)
33+
flashcatLogs.logger.error('Error occurred', { team: 'myTeam' }, ex)
3534
}
3635
```
3736

3837
<!-- Note: all URLs should be absolute -->
3938

40-
[1]: https://docs.datadoghq.com/logs/log_collection/javascript
4139
[2]: https://www.npmjs.com/package/@flashcatcloud/browser-logs

0 commit comments

Comments
 (0)