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

[draft] otel SDK compatibility #1533

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

Conversation

sfc-gh-pmardziel
Copy link
Contributor

@sfc-gh-pmardziel sfc-gh-pmardziel commented Oct 3, 2024

Description

Need to make our otel system compatible with otel SDK.

Other details good to know for developers

Please include any other details of this change useful for TruLens developers.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • New Tests
  • This change includes re-generated golden test results
  • This change requires a documentation update

Important

Add experimental OTEL integration examples for TruLens, including configuration, dummy script, and dependencies.

  • Examples:
    • Add Makefile for running OTEL with environment variables and command line arguments, starting/stopping Zipkin and collector.
    • Add dummy.py to demonstrate OTEL integration with TruLens, including setting tracer provider and feedback functions.
    • Add otel-collector-config.yaml for OTEL SDK configuration.
    • Add README.md for OTEL configuration instructions.
  • Dependencies:
    • Add requirements.txt with OTEL and related dependencies.

This description was created by Ellipsis for eba8628. It will automatically update as commits are pushed.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 3, 2024
@sfc-gh-pmardziel sfc-gh-pmardziel marked this pull request as draft October 3, 2024 21:15
@dosubot dosubot bot added the documentation Improvements or additions to documentation label Oct 3, 2024
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.

👍 Looks good to me! Reviewed everything up to eba8628 in 18 seconds

More details
  • Looked at 229 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 drafted comments based on config settings.
1. examples/experimental/otel/Makefile:35
  • Draft comment:
    Ensure that otel-collector-config.yaml is in the current directory when running start_collector, or specify the full path to the file.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The Makefile uses a Docker volume mount for the otel-collector-config.yaml file, but it assumes the file is in the current directory. This might cause issues if the file is not present or if the command is run from a different directory.
2. examples/experimental/otel/Makefile:45
  • Draft comment:
    The stop_zipkin target stops all containers with the ancestor openzipkin/zipkin. Consider stopping only the specific container by name to avoid affecting other containers.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The stop_zipkin target in the Makefile uses a command that stops all containers with the ancestor openzipkin/zipkin. This could unintentionally stop multiple containers if more than one is running.
3. examples/experimental/otel/dummy.py:7
  • Draft comment:
    dotenv is imported but not listed in requirements.txt. Add it to ensure it's installed.
  • Reason this comment was not posted:
    Comment did not seem useful.
4. examples/experimental/otel/dummy.py:35
  • Draft comment:
    Avoid using broad exceptions. Catch specific exceptions to handle only expected errors.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The dummy.py script uses a try-except block to print a message if no tracer provider is set, but it uses a broad exception clause which is not a best practice.
5. examples/experimental/otel/dummy.py:47
  • Draft comment:
    Consider providing instructions or conditions for when to use the commented-out Zipkin exporter setup code.
  • Reason this comment was not posted:
    Confidence changes required: 30%
    In dummy.py, the commented-out code for setting up the Zipkin exporter and session with exporter might be useful for users. Consider providing instructions or conditions under which this code should be used.

Workflow ID: wflow_I29yAd6ExY3TSU0O


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant