mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
A bit more logging in sentry (#54)
* A bit more logging in sentry * Make sure we reach 100ms delay in buffer-esimator test * Increase fetch-depth * remote only * Run turbo setup * no preflight
This commit is contained in:
parent
341c4a1217
commit
65174ed2f5
6 changed files with 74 additions and 34 deletions
8
.github/workflows/cd.yaml
vendored
8
.github/workflows/cd.yaml
vendored
|
|
@ -15,8 +15,8 @@ jobs:
|
|||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_PREFLIGHT: 'true'
|
||||
TURBO_API_URL: ${{ secrets.TURBO_API_URL }}
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -31,12 +31,6 @@ jobs:
|
|||
- name: Install Dependencies
|
||||
run: yarn --frozen-lockfile
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Turbo cache
|
||||
with:
|
||||
path: node_modules/.cache/turbo
|
||||
key: ${{ runner.os }}-turbo-cache-v1-${{ hashFiles('yarn.lock') }}
|
||||
|
||||
- name: Generate GraphQL Types
|
||||
run: yarn graphql:generate
|
||||
|
||||
|
|
|
|||
41
.github/workflows/ci.yaml
vendored
41
.github/workflows/ci.yaml
vendored
|
|
@ -27,12 +27,14 @@ jobs:
|
|||
POSTGRES_USER: postgres
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_PREFLIGHT: 'true'
|
||||
TURBO_API_URL: ${{ secrets.TURBO_API_URL }}
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
|
|
@ -70,12 +72,14 @@ jobs:
|
|||
env:
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_PREFLIGHT: 'true'
|
||||
TURBO_API_URL: ${{ secrets.TURBO_API_URL }}
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 5
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
|
|
@ -87,6 +91,9 @@ jobs:
|
|||
path: '**/node_modules'
|
||||
key: ${{ github.sha }}
|
||||
|
||||
- name: Setup Turbo
|
||||
run: node ./scripts/turborepo-setup.js
|
||||
|
||||
- name: Build
|
||||
run: yarn workspace integration-tests run build-and-pack
|
||||
env:
|
||||
|
|
@ -122,12 +129,14 @@ jobs:
|
|||
HIVE_TOKEN: ${{ secrets.HIVE_TOKEN }}
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_PREFLIGHT: 'true'
|
||||
TURBO_API_URL: ${{ secrets.TURBO_API_URL }}
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 5
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
|
|
@ -158,12 +167,14 @@ jobs:
|
|||
env:
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_PREFLIGHT: 'true'
|
||||
TURBO_API_URL: ${{ secrets.TURBO_API_URL }}
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
|
|
@ -189,12 +200,14 @@ jobs:
|
|||
env:
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_PREFLIGHT: 'true'
|
||||
TURBO_API_URL: ${{ secrets.TURBO_API_URL }}
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 5
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
|
|
@ -206,6 +219,9 @@ jobs:
|
|||
path: '**/node_modules'
|
||||
key: ${{ github.sha }}
|
||||
|
||||
- name: Setup Turbo
|
||||
run: node ./scripts/turborepo-setup.js
|
||||
|
||||
- name: Generate Types
|
||||
run: yarn graphql:generate
|
||||
|
||||
|
|
@ -220,12 +236,14 @@ jobs:
|
|||
env:
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_PREFLIGHT: 'true'
|
||||
TURBO_API_URL: ${{ secrets.TURBO_API_URL }}
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 5
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
|
|
@ -237,6 +255,9 @@ jobs:
|
|||
path: '**/node_modules'
|
||||
key: ${{ github.sha }}
|
||||
|
||||
- name: Setup Turbo
|
||||
run: node ./scripts/turborepo-setup.js
|
||||
|
||||
- name: Generate Types
|
||||
run: yarn graphql:generate
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import {
|
|||
import got from 'got';
|
||||
import { stripIgnoredCharacters } from 'graphql';
|
||||
import * as Sentry from '@sentry/node';
|
||||
import { Dedupe } from '@sentry/integrations';
|
||||
import { Dedupe, ExtraErrorData } from '@sentry/integrations';
|
||||
import { asyncStorage } from './async-storage';
|
||||
import { graphqlHandler } from './graphql-handler';
|
||||
import { clickHouseReadDuration, clickHouseElapsedDuration } from './metrics';
|
||||
|
|
@ -32,16 +32,12 @@ export async function main() {
|
|||
new Sentry.Integrations.Http({ tracing: true }),
|
||||
new Sentry.Integrations.ContextLines(),
|
||||
new Sentry.Integrations.LinkedErrors(),
|
||||
/**
|
||||
* Disabled due to weird issues.
|
||||
* Might be related: https://github.com/getsentry/sentry-javascript/issues/2611 , https://github.com/getsentry/sentry-javascript/pull/4487
|
||||
*
|
||||
*/
|
||||
// new ExtraErrorData({
|
||||
// depth: 2,
|
||||
// }),
|
||||
new ExtraErrorData({
|
||||
depth: 2,
|
||||
}),
|
||||
new Dedupe(),
|
||||
],
|
||||
maxBreadcrumbs: 5,
|
||||
defaultIntegrations: false,
|
||||
autoSessionTracking: false,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -130,9 +130,9 @@ test('reset after N milliseconds', async () => {
|
|||
|
||||
expect(estimator.estimate(10)).toBeCloseTo(1000);
|
||||
|
||||
await waitFor(100);
|
||||
await waitFor(150);
|
||||
|
||||
// reached 15 ms, so reset
|
||||
// reached 100 ms, so reset
|
||||
estimator.teach({
|
||||
bytes: 500,
|
||||
operations: 10,
|
||||
|
|
|
|||
20
patches/@sentry+hub+6.19.7.patch
Normal file
20
patches/@sentry+hub+6.19.7.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
diff --git a/node_modules/@sentry/hub/esm/scope.js b/node_modules/@sentry/hub/esm/scope.js
|
||||
index 03e6711..b786671 100644
|
||||
--- a/node_modules/@sentry/hub/esm/scope.js
|
||||
+++ b/node_modules/@sentry/hub/esm/scope.js
|
||||
@@ -365,9 +365,14 @@ var Scope = /** @class */ (function () {
|
||||
*/
|
||||
Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {
|
||||
var _this = this;
|
||||
- if (index === void 0) { index = 0; }
|
||||
+ console.log('notifyEventProcessors index', index);
|
||||
+ if (index === void 0) {
|
||||
+ index = 0;
|
||||
+ console.log('notifyEventProcessors index set to', 0);
|
||||
+ }
|
||||
return new SyncPromise(function (resolve, reject) {
|
||||
var processor = processors[index];
|
||||
+ console.log('processor', processor);
|
||||
if (event === null || typeof processor !== 'function') {
|
||||
resolve(event);
|
||||
}
|
||||
|
|
@ -9,17 +9,26 @@ import { fileURLToPath } from 'url';
|
|||
|
||||
const cwd = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
|
||||
function main() {
|
||||
const configDir = '.turbo';
|
||||
const configFile = path.resolve(cwd, configDir, 'config.json');
|
||||
function loadEnv() {
|
||||
const envFile = path.resolve(cwd, '.env');
|
||||
|
||||
if (!fs.existsSync(envFile)) {
|
||||
console.log('[turborepo-setup] No .env file found. Skipping.');
|
||||
return;
|
||||
return {};
|
||||
}
|
||||
|
||||
const env = dotenv.parse(fs.readFileSync(envFile, 'utf-8'));
|
||||
return dotenv.parse(fs.readFileSync(envFile, 'utf-8'));
|
||||
}
|
||||
|
||||
function main() {
|
||||
const configDir = '.turbo';
|
||||
const configFile = path.resolve(cwd, configDir, 'config.json');
|
||||
const envFile = loadEnv();
|
||||
|
||||
const env = {
|
||||
TURBO_API_URL: envFile.TURBO_API_URL || process.env.TURBO_API_URL,
|
||||
TURBO_TOKEN: envFile.TURBO_TOKEN || process.env.TURBO_TOKEN,
|
||||
TURBO_TEAM: envFile.TURBO_TEAM || process.env.TURBO_TEAM,
|
||||
};
|
||||
|
||||
if (!env.TURBO_API_URL || !env.TURBO_TOKEN || !env.TURBO_TEAM) {
|
||||
console.log(
|
||||
|
|
|
|||
Loading…
Reference in a new issue