8000 fix(tracing): introduce tracingEnabled option to support sdk initialization for standalone processor by galkleinman · Pull Request #599 · traceloop/openllmetry-js · GitHub
[go: up one dir, main page]

Skip to content

fix(tracing): introduce tracingEnabled option to support sdk initialization for standalone processor #599

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

Merged
merged 1 commit into from
Apr 27, 2025

Conversation

galkleinman
Copy link
Contributor
@galkleinman galkleinman commented Apr 27, 2025

Important

Adds tracingEnabled option to Traceloop SDK to control tracing initialization, updating sample app and interfaces accordingly.

  • Behavior:
    • Introduces tracingEnabled option in InitializeOptions to control tracing initialization.
    • In index.ts, initialize() now checks tracingEnabled before calling startTracing().
  • Sample App:
    • Updates sample_otel_sdk.ts to use tracingEnabled: false in traceloop.initialize().
    • Replaces direct imports with traceloop namespace for createSpanProcessor, withTask, and withWorkflow.
  • Interfaces:
    • Adds tracingEnabled to InitializeOptions in initialize-options.interface.ts.

This description was created by Ellipsis for 9a9db7f. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor
@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 9a9db7f in 59 seconds. Click for details.
  • Reviewed 71 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 10 draft 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% <= threshold 50% 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% <= threshold 50% 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% <= threshold 50% 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% <= threshold 50% 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% <= threshold 50% 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% <= threshold 50% 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% <= threshold 50% 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% <= threshold 50% 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 Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@galkleinman galkleinman merged commit 1fa682e into main Apr 27, 2025
4 checks passed
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.

2 participants
0