-
Notifications
You must be signed in to change notification settings - Fork 21
Release beta to production #1054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…uter
This commit implements `opentelemetry` instrumentation for the `decode` and `sendEncoded` calls in `wrapRouter`.
Changes:
- `typed-express-wrapper`
- `@opentelemetry/api@^1.0.0` added as an optional peer dependency
- `@opentelemetry/sdk-trace-base@1.30.1` , `@opentelemetry/sdk-trace-node@1.30.1`, and `@opentelemetry/api@1.9.0` added as dev dependencies
- `wrapRouter` modified to create decode and encode spans if `@opentelemetry/api` is installed
- if `@opentelemetry/api` is not installed, spans are not created
- `onDecodeError` option removed. Please use `decodeErrorFormatter` and `getDecodeErrorStatusCode`
- `decodeErrorFormatter` takes in an array of `ValidationError`s and a `WrappedRequest`, returning a `Json` object.
- `getDecodeErrorStatusCode` takes in an array of `ValidationError`s and a `WrappedRequest`, returning a number.
- `onEncodeError` option removed. Please use `encodeErrorFormatter` and `getEncodeErrorStatusCode`
- `encodeErrorFormatter` takes in an error and a `WrappedRequest`, returning a `Json` object.
- `getEncodeErrorStatusCode` takes in an error and a `WrappedRequest`, returning a number.
- `typed-express-router` now handles the sending of the http response when there is a decode or encode error
- `express-wrapper`
- `routerForApiSpec` modified to pass in new parameters `decodeErrorFormatter`, `getDecodeErrorStatusCode`, `encodeErrorFormatter`, and `getEncodeErrorStatusCode`
- These new parameters can also be customized by modifying the props passed into the function (see `CreateRouterProps`)
BREAKING CHANGE: `onDecodeError` and `onEncodeError` have been removed. Please use `decodeErrorFormatter`, `getDecodeErrorStatusCode`, `encodeErrorFormatter`, and `getEncodeErrorStatusCode`
…yped-express-router feat(opentelemetry): create otel instrumentation for typed-express-router
docs: update README.md with information regarding new error formatters
ericcrosson-bitgo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merges beta into master. Thanks @starfy84!
|
🎉 This PR is included in version @api-ts/typed-express-router@2.0.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/express-wrapper@2.0.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/openapi-generator@5.10.2 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
Closes: DX-1642
This PR merges beta changes into the master branch, publishing the beta packages to the latest version