fix(tracing): introduce tracingEnabled option to support sdk initialization for standalone processor#599
Merged
galkleinman merged 1 commit intomainfrom Apr 27, 2025
Conversation
…zation for standalone processor
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 9a9db7f in 59 seconds. Click for details.
- Reviewed
71lines of code in3files - Skipped
0files when reviewing. - Skipped posting
10draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/sample-app/src/sample_otel_sdk.ts:8
- Draft comment:
Explicitly disabling tracing for standalone processor is clear. Consider adding an inline comment explaining why tracing is disabled. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. packages/traceloop-sdk/src/lib/configuration/index.ts:89
- Draft comment:
Conditional check on 'tracingEnabled' nicely defaults to true if undefined. Ensure documentation and tests reflect this default behavior. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. packages/traceloop-sdk/src/lib/interfaces/initialize-options.interface.ts:146
- Draft comment:
The doc comment for 'tracingEnabled' correctly states it defaults to true, matching the config logic. No changes required. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
4. packages/sample-app/src/sample_otel_sdk.ts:4
- Draft comment:
Refactored import: using a namespace import for '@traceloop/node-server-sdk' improves consistency. Ensure related docs and usage examples are updated. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
5. packages/sample-app/src/sample_otel_sdk.ts:8
- Draft comment:
SDK initialization now explicitly disables tracing and sync. Confirm that 'tracingEnabled: false' suits standalone processor use. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
6. packages/sample-app/src/sample_otel_sdk.ts:49
- Draft comment:
Namespace-qualified calls for withWorkflow and withTask are now used. Verify that all related function calls and documentation are updated accordingly. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
7. packages/traceloop-sdk/src/lib/configuration/index.ts:89
- Draft comment:
Conditional tracing startup now respects the 'tracingEnabled' option (defaulting to enabled if undefined). This prevents unwanted tracing initialization when disabled. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
8. packages/traceloop-sdk/src/lib/interfaces/initialize-options.interface.ts:146
- Draft comment:
Added new 'tracingEnabled' option to InitializeOptions with a default (true) noted in the docs. Ensure default behavior is consistent across the SDK. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
9. packages/traceloop-sdk/src/lib/interfaces/initialize-options.interface.ts:44
- Draft comment:
Typo found: 'developement' should be spelled as 'development'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
10. packages/traceloop-sdk/src/lib/interfaces/initialize-options.interface.ts:123
- Draft comment:
Typo found: 'retires' should be 'retries' in the comment. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_xTheHj8TqmeNE4p5
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
nirga
approved these changes
Apr 27, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Adds
tracingEnabledoption to Traceloop SDK to control tracing initialization, updating sample app and interfaces accordingly.tracingEnabledoption inInitializeOptionsto control tracing initialization.index.ts,initialize()now checkstracingEnabledbefore callingstartTracing().sample_otel_sdk.tsto usetracingEnabled: falseintraceloop.initialize().traceloopnamespace forcreateSpanProcessor,withTask, andwithWorkflow.tracingEnabledtoInitializeOptionsininitialize-options.interface.ts.This description was created by
for 9a9db7f. You can customize this summary. It will automatically update as commits are pushed.