docs: updates for breaking changes (#9558)

- Update modules registration
- Update `medusa-config.js` to `medusa-config.ts`
- Update the out directory in the admin deployment guide
- Update logger imports
- Other fixes

Note: will need to re-generate references afterwards

Closes #9548
This commit is contained in:
Shahed Nasser
2024-10-14 10:40:30 +00:00
committed by GitHub
parent 2a9fc0e514
commit b6df24463d
53 changed files with 319 additions and 324 deletions
@@ -44,14 +44,13 @@ Also, install the dependencies relevant for the exporter you use. If you're usin
npm install @opentelemetry/exporter-zipkin
```
### Add instrumentation.js
### Add instrumentation.ts
Next, create the file `instrumentation.js` with the following content:
Next, create the file `instrumentation.ts` with the following content:
```js title="instrumentation.js"
const { registerOtel } = require("@medusajs/medusa")
// If using an exporter other than Zipkin, require it here.
const { ZipkinExporter } = require("@opentelemetry/exporter-zipkin")
```ts title="instrumentation.ts"
import { registerOtel } from "@medusajs/medusa"
import { ZipkinExporter } from "@opentelemetry/exporter-zipkin"
// If using an exporter other than Zipkin, initialize it here.
const exporter = new ZipkinExporter({
@@ -72,7 +71,7 @@ export function register() {
}
```
In the `instrumentation.js` file, you export a `register` function that uses Medusa's `registerOtel` utility function.
In the `instrumentation.ts` file, you export a `register` function that uses Medusa's `registerOtel` utility function.
You also initialize an instance of the exporter, such as Zipkin, and pass it to the `registerOtel` function.