-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(sdk-node): fail-fast on LoggerProvider creation from config #6785
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
Changes from 10 commits
7032479
3c36268
aadf86d
68bfbd0
eff328b
fee5125
57ba20b
6b4a899
8b3da47
b2f95ae
4106a1e
7458520
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,7 +55,7 @@ export interface SDKOptions { | |
| } | ||
|
|
||
| export interface SDKComponents { | ||
| contextManager: ContextManager; | ||
| contextManager?: ContextManager; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on the existing sdk start parameters (
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Making all the const components: SDKComponents = {};
try {
components.contextManager = new AsyncLocalStorageContextManager();
components.contextManager.enable();
...
} catch (err) {
// ... use `components` here for cleanup
}Interface |
||
| loggerProvider?: LoggerProvider; | ||
| meterProvider?: MeterProvider; | ||
| tracerProvider?: BasicTracerProvider; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to confirm (as per your PR description), do you plan on opening following PRs to update here to createMeterProviderFromConfig and below a createTracerProviderFromConfig?
if your plan is to do this right after, then fine, otherwise make sure you open an issue so is not forgotten :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, definitely. I wanted to start with just one in case discussion/review suggested significant changes.