Skip to content
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

feat: Update to @opentelemetry/api v1.0.0-rc.0 #30

Merged
merged 2 commits into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ provider.register({
})

// Note: the above is just a basic example. fastify-opentelemetry is compatible with any
// @opentelemetry/api(0.18.0) configuration.
// @opentelemetry/api configuration.
```


Expand Down Expand Up @@ -155,16 +155,24 @@ This plugin registers the following Fastify hooks:

- `onRoute`: Added only if `wrapRoutes` is enabled.

#### OpenTelemetry Compatibility
As of version `0.10.0` this plugin is compatible with `@opentelemetry/api@0.18.0`. Older versions of OpenTelemetry will require previous releases of fastify-opentelemetry.
#### OpenTelemetry Compatibility

- `@opentelemetry/api@0.17.0` -> `@autotelic/fastify-opentelemetry@0.9.0`
- `@opentelemetry/api@0.15.0` -> `@autotelic/fastify-opentelemetry@0.8.0`
- `@opentelemetry/api@0.14.0` -> `@autotelic/fastify-opentelemetry@0.7.0`
- `@opentelemetry/api@0.13.0` -> `@autotelic/fastify-opentelemetry@0.5.0`
- `@opentelemetry/api@0.12.0` -> `@autotelic/fastify-opentelemetry@0.4.0`
- `@opentelemetry/api@0.10.0` -> `@autotelic/fastify-opentelemetry@0.2.4`
- `@opentelemetry/api@0.9.0` -> `@autotelic/fastify-opentelemetry@0.1.1`
As the [OpenTelemetry API](https://github.com/open-telemetry/opentelemetry-js-api#version-compatibility) uses a
variable on the `global` object to store the global API, care needs to be taken to ensure all modules are compatible.

Each version of the OpenTelemetry API will require a specific release of fastify-opentelemetry.

| OpenTelemetry API Version | Minimum Fastify OpenTelemetry Version |
| ------------------------------- | ------------------------------------------ |
| `@opentelemetry/api@1.0.0-rc.0` | `@autotelic/fastify-opentelemetry@0.12.0` |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, may need to change the version under @fastify-opentelemetry version here, depending on what you want it released as

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks for sprucing it up! 😎

| `@opentelemetry/api@0.18.0` | `@autotelic/fastify-opentelemetry@0.10.0` |
| `@opentelemetry/api@0.17.0` | `@autotelic/fastify-opentelemetry@0.9.0` |
| `@opentelemetry/api@0.15.0` | `@autotelic/fastify-opentelemetry@0.8.0` |
| `@opentelemetry/api@0.14.0` | `@autotelic/fastify-opentelemetry@0.7.0` |
| `@opentelemetry/api@0.13.0` | `@autotelic/fastify-opentelemetry@0.5.0` |
| `@opentelemetry/api@0.12.0` | `@autotelic/fastify-opentelemetry@0.4.0` |
| `@opentelemetry/api@0.10.0` | `@autotelic/fastify-opentelemetry@0.2.4` |
| `@opentelemetry/api@0.9.0` | `@autotelic/fastify-opentelemetry@0.1.1` |

[Fastify]: https://fastify.io
[OpenTelemetry API]: https://github.com/open-telemetry/opentelemetry-js-api
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
"node": ">=10.16.0"
},
"devDependencies": {
"@opentelemetry/context-async-hooks": "^0.18.0",
"@opentelemetry/core": "^0.18.0",
"@opentelemetry/tracing": "^0.18.0",
"@opentelemetry/api": "^1.0.0-rc.0",
"@opentelemetry/context-async-hooks": "^0.19.0",
"@opentelemetry/core": "^0.19.0",
"@opentelemetry/tracing": "^0.19.0",
"@types/node": "^14.14.36",
"@typescript-eslint/eslint-plugin": "^4.20.0",
"@typescript-eslint/parser": "^4.20.0",
Expand All @@ -52,8 +53,10 @@
"tap": "^14.11.0",
"tsd": "^0.14.0"
},
"peerDependencies": {
"@opentelemetry/api": "^1.0.0-rc.0"
},
"dependencies": {
"@opentelemetry/api": "^0.18.0",
"fastify-plugin": "^3.0.0"
},
"lint-staged": {
Expand Down