-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is going to cause us lots of problems when we want to export new methods, e.g. methods to send custom metrics which I'll be doing in a later commit. Nobody is using the JavaScript API at the moment and so this is a safe major version bump for most. It's also worth addressing this while use is still low. See #945.
- Loading branch information
1 parent
f1bac27
commit bfa3ba3
Showing
6 changed files
with
70 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
# Migration guide for @dotcom-reliability-kit/opentelemetry | ||
|
||
This document outlines how to migrate to the latest version of the Reliability Kit opentelemetry package. Throughout this guide we use the following emoji and labels to indicate the level of change required: | ||
|
||
Emoji | Label | Meaning | ||
----------------|:------------------|:------- | ||
:red_circle: | Breaking | A breaking change which will likely require code or config changes to resolve | ||
:orange_circle: | Possibly Breaking | A breaking change that is unlikely to require code changes but things outside of the code (e.g. logs) may have changed | ||
|
||
* [Migrating from v1 to v2](#migrating-from-v1-to-v2) | ||
* [JavaScript API changes](#javascript-api-changes) | ||
|
||
|
||
## Migrating from v1 to v2 | ||
|
||
### JavaScript API changes | ||
|
||
**:red_circle: Breaking:** If you're using the manual setup of OpenTelemetry via the JavaScript API, the setup method is no longer a default export. Instead, use a named `setup` export: | ||
|
||
```diff | ||
- import setupOpenTelemetry from '@dotcom-reliability-kit/opentelemetry'; | ||
+ import opentelemetry from '@dotcom-reliability-kit/opentelemetry'; | ||
// or | ||
- const setupOpenTelemetry = require('@dotcom-reliability-kit/opentelemetry'); | ||
+ const opentelemetry = require('@dotcom-reliability-kit/opentelemetry'); | ||
|
||
- setupOpenTelemetry({ /* ... */ }); | ||
+ opentelemetry.setup({ /* ... */ }); | ||
``` | ||
|
||
If you're using the `--require` method or importing `@dotcom-reliability-kit/opentelemetry/setup` then this is not a breaking change. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters