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(otel): expose SDK instance from registerOTel #141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zloit
Copy link

@zloit zloit commented Feb 3, 2025

This change allows users to properly manage OpenTelemetry SDK lifecycle by exposing the SDK instance from registerOTel function.

Previously, there was no way to properly shutdown the SDK which could lead to lost telemetry data during application shutdown. Now users can store the SDK instance and call shutdown when needed.

Example:

const sdk = registerOTel("service-name");
process.on('SIGTERM', async () => {
  await sdk.shutdown();
});

This change allows users to properly manage OpenTelemetry SDK lifecycle
by exposing the SDK instance from registerOTel function.

Previously, there was no way to properly shutdown the SDK
which could lead to lost telemetry data during application shutdown.
Now users can store the SDK instance and call shutdown when needed.

Example:

```typescript
const sdk = registerOTel("service-name");
process.on('SIGTERM', async () => {
  await sdk.shutdown();
});
```
Copy link

vercel bot commented Feb 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
otel-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 3:55pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant