-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from infrastackai/npm-edge-support
startotel deprecation, grpc and http/proto protocol support, nextjs s…
- Loading branch information
Showing
17 changed files
with
743 additions
and
799 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { startOtel } from "@infrastack/otel"; | ||
import { Infrastack } from "@infrastack-otel"; | ||
|
||
startOtel({ | ||
serviceName: "infrastack-expressjs-example", | ||
Infrastack.init({ | ||
serviceName: "Infrastack ExpressJS Example", | ||
}); |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { startOtel } from '@infrastack/otel'; | ||
import { Infrastack } from "@infrastack-otel"; | ||
|
||
startOtel({ | ||
serviceName: 'nestjs-otel-example', | ||
Infrastack.init({ | ||
serviceName: "Infrastack NestJS Example", | ||
}); |
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
export async function register() { | ||
if (process.env.NEXT_RUNTIME === "nodejs") { | ||
const { startOtel } = await import("@infrastack/otel"); | ||
import { Infrastack } from "@infrastack-otel"; | ||
|
||
startOtel({ | ||
serviceName: "infrastack-nextjs-example", | ||
}); | ||
} | ||
export async function register() { | ||
Infrastack.init({ | ||
serviceName: "Infrastack NextJS Example", | ||
}); | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/javascript/otel/.changeset/selfish-melons-yell.md
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,19 @@ | ||
--- | ||
"@infrastack/otel": minor | ||
--- | ||
|
||
# startOtel Deprecation | ||
The `startOtel` function has been replaced with `Infrastack.init`. We believe that we will be bringing more functionality to the package, and this will make it easier for us to do so. | ||
|
||
# Protocol Support | ||
We have added support for gRPC as a protocol. This is available as an option in the `init` function under the enum `Protocol`. The default protocol is GRPC. | ||
|
||
# NextJS Performance Improvements | ||
We were aware of Vercel deployed Next.js applications had problems. We have made some performance improvements to the SDK to help with this. | ||
|
||
Now, we are not directly depending on the `@opentelemetry/sdk-node` package since we had bunch of import errors in the Next.js framework. | ||
|
||
From now on, `next.config.mjs` is more straightforward. | ||
|
||
Also, we adapted some `vercel` related optimizations by using the `@vercel/otel` packages some functionalities, specifically the `VercelRequestContext` and flushing the tracer when the request ends. | ||
|
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
Oops, something went wrong.