Skip to content

Commit

Permalink
instrument with flagon
Browse files Browse the repository at this point in the history
  • Loading branch information
EandrewJones committed Apr 8, 2024
1 parent 4b1f420 commit 3808d74
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
15 changes: 15 additions & 0 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions superset-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"dom-to-pdf": "^0.3.1",
"emotion-rgba": "0.0.12",
"fast-glob": "^3.2.7",
"flagon-userale": "^2.3.0",
"fontsource-fira-code": "^4.0.0",
"fs-extra": "^10.0.0",
"fuse.js": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/middleware/loggerMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { LOG_EVENT } from '../logger/actions';
import { LOG_EVENT_TYPE_TIMING } from '../logger/LogUtils';
import DebouncedMessageQueue from '../utils/DebouncedMessageQueue';

const LOG_ENDPOINT = 'http://userale-test:8000';
const LOG_ENDPOINT ='http://localhost:8085/topics/superset-logs';

Check failure on line 29 in superset-frontend/src/middleware/loggerMiddleware.js

View workflow job for this annotation

GitHub Actions / frontend-build

Insert `·`

const sendBeacon = events => {
if (events.length <= 0) {
Expand Down
8 changes: 8 additions & 0 deletions superset-frontend/src/views/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import * as userale from 'flagon-userale';
import React, { Suspense, useEffect } from 'react';
import { hot } from 'react-hot-loader/root';
import {
Expand Down Expand Up @@ -51,6 +52,13 @@ let lastLocationPathname: string;

const boundActions = bindActionCreators({ logEvent }, store.dispatch);

userale.options({
userId: bootstrapData.user?.username,
autostart: true,
url: 'http://localhost:8085/topics/superset',
logDetails: true,
});

const LocationPathnameLogger = () => {
const location = useLocation();
useEffect(() => {
Expand Down
2 changes: 2 additions & 0 deletions superset/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,7 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
"'self'",
"https://api.mapbox.com",
"https://events.mapbox.com",
"http://localhost:*",
],
"object-src": "'none'",
"style-src": [
Expand Down Expand Up @@ -1488,6 +1489,7 @@ def EMAIL_HEADER_MUTATOR( # pylint: disable=invalid-name,unused-argument
"'self'",
"https://api.mapbox.com",
"https://events.mapbox.com",
"http://localhost:*",
],
"object-src": "'none'",
"style-src": [
Expand Down

0 comments on commit 3808d74

Please sign in to comment.