1
0
mirror of synced 2025-12-21 10:57:10 -05:00
Commit Graph

23 Commits

Author SHA1 Message Date
Peter Bengtsson
014c24d78b use got to send to Hydro (#23286) 2021-12-02 04:30:44 +00:00
Peter Bengtsson
fab5bef972 Avoid an infinite FailBot.report() loop (#22837)
* Avoid an infinite FailBot.report() loop

Part of #1221

* Update middleware/events.js

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2021-11-16 01:05:03 +00:00
Kevin Heis
dca7e56c3d More hydro error info (#22533)
* Add more info to hydro failures

* Clean up

* Update hydro.js

* Move hydro names to event schema file

* Update hydro.js
2021-11-02 16:13:48 +00:00
Kevin Heis
4d0e9c70a3 Add new fields to analytics event context: status, page_type, page_document_type (#21115)
* Add new fields to analytics event context: status, page-type, page-document-type

* Update schema-event.js

* Typescript

* Add status meta to error pages

* Update DefaultLayout.tsx

* Update DefaultLayout.tsx

* Update building-and-testing-nodejs-or-python.tsx
2021-08-26 14:58:45 -07:00
Kevin Heis
8a56437c93 Pretty format (#20352)
* Update prettier flow to include JS

* Run prettier

* ...run prettier
2021-07-14 14:35:01 -07:00
Kevin Heis
42e785b0a8 Migrate CommonJS to ESM (#20301)
* First run of script

* Get the app running --- ish

* Get NextJS working

* Remove `node:`

* Get more tests passing in unit directory

* Update FailBot test to use nock

* Update test.yml

* Update Dockerfile

* tests/content fixes

* Update page.js

* Update build-changelog.js

* updating tests/routing

* Update orphan-tests.js

* updating tests/rendering

* Update .eslintrc.js

* Update .eslintrc.js

* Install jest/globals

* "linting" tests

* staging update to server.mjs

* Change '.github/allowed-actions.js' to a ESM export

* Lint

* Fixes for the main package.json

* Move Jest to be last in the npm test command so we can pass args

* Just use 'npm run lint' in the npm test command

* update algolia label script

* update openapi script

* update require on openapi

* Update enterprise-algolia-label.js

* forgot JSON.parse

* Update lunr-search-index.js

* Always explicitly include process.cwd() for JSON file reads pathed from project root

* update graphql/update-files.js script

* Update other npm scripts using jest to pass ESM NODE_OPTIONS

* Update check-for-enterprise-issues-by-label.js for ESM

* Update create-enterprise-issue.js for ESM

* Import jest global for browser tests

* Convert 'script/deploy' to ESM

Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: James M. Greene <jamesmgreene@github.com>
2021-07-14 13:49:18 -07:00
Kevin Heis
26a8e61d3a Update survey to use React/TS (#19728)
* Update survey to use React/TS

* Working survey form in react land

* A little cleanup

* Update Search.tsx

* Update Survey.tsx

* Remove token field from schema entirely, just let it fail validation

* Update events.js

* Update survey.html

* use Link component

* Use enum for state

* Update old to match new
2021-06-08 17:34:45 +00:00
Kevin Heis
afa551f2ee Upgrade AJV (#19443)
* Upgrade AJV

* Fixes for AJV upgrade

* lint fix

* Update index.tsx
2021-05-20 17:46:04 +00:00
Mike Surowiec
8998e52dc0 move hydro sentry error out of /events, to hydro 2021-04-06 16:28:41 -07:00
Mike Surowiec
008faf57eb improve sentry reporting, add metrics for hydro 2021-04-06 16:21:40 -07:00
Mike Surowiec
adb81ce5b5 update webhook response to not return fields, return 200 2021-04-06 11:24:21 -07:00
Mike Surowiec
0a8b108b2a remove semi-colon 2021-04-06 10:53:14 -07:00
Mike Surowiec
bd152312f2 don't await hydro for /events POST response 2021-04-06 07:41:30 -07:00
Mike Surowiec
93b78216f8 fix: middleware/events - check res.headerSent before attempting to send response
- Closes #18527
2021-04-05 09:23:45 -07:00
James M. Greene
c940dcd98b Middleware overhaul! (#18218)
* Middleware overhaul!

- Remove unnecessary 'async' keywords from middleware functions
- Ensure all middleware functions we create have names
- Wrap the method contents of all async middleware functions in a try-catch+next(error) pattern

* Use asyncMiddleware wrapper instead of try-catch+next(error) pattern

* Remove unnecessary try-catch+next(error) pattern from context middleware
2021-03-11 01:12:41 +00:00
Jason Etcovitch
4a23a3e675 Tweak /events exception reporting (#17776)
* Include fields as metadata instead of error inst

* Include hydroText
2021-02-09 22:24:01 +00:00
Jason Etcovitch
6d20e43444 Add FailBot.report call to events errors (#17773)
* Add FailBot.report call to events errors

* Actually throw the error
2021-02-09 16:27:26 -05:00
Jason Etcovitch
ac2bc682d1 Don't bork locally without Hydro (#16361)
* Add hydro.maySend() check

* Return a 200 to differentiate

* Add NODE_ENV check, move below validation
2020-11-05 19:06:46 +00:00
Kevin Heis
380c4dcc82 Hydro exit event (#16067)
* Start a basic exit event

* Combine to one performance function

* Lint

* Fancy operators

* Update events.js

* Update events.js

* Update cookie-settings.js

* Add scroll tracking

* Tell "standard" to use babel-eslint

* Throttle scroll tracking

* Lint

* Use sendBeacon

* Update index.js
2020-10-21 09:42:02 -07:00
Kevin Heis
8982d200cc Migrate experiments and helpfulness to Hydro (#16059)
* Migrate experiments and helpfulness to Hydro

* Clean out old tests

* ...and more old tests to delete
2020-10-19 14:31:54 -07:00
Kevin Heis
10371a375b Send a 502 when write to airtable or hydro fails (#15976) 2020-10-09 10:26:54 -07:00
Kevin Heis
7c0c493c35 Sending events to POST /events endpoint (#15796) 2020-10-08 09:24:41 -07:00
Vanessa Yuen
3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00