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 |
---|---|---|
🔴 | Breaking | A breaking change which will likely require code or config changes to resolve |
🟠 | Possibly Breaking | A breaking change that is unlikely to require code changes but things outside of the code (e.g. logs) may have changed |
🟡 | Deprecation | A deprecated feature which will require code changes in the future |
🔴 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:
- import setupOpenTelemetry from '@dotcom-reliability-kit/opentelemetry';
+ import * as 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.