traceloop / openllmetry

Open-source observability for your LLM application, based on OpenTelemetry
https://www.traceloop.com/openllmetry
Apache License 2.0
3.42k stars 675 forks source link

πŸ› Bug Report: content written to std out #2284

Open damianoneill opened 4 hours ago

damianoneill commented 4 hours ago

Which component is this bug for?

Traceloop SDK

πŸ“œ Description

I've just update the library from 0.30.0 to 0.33.10 and I am now getting content written to std out e.g.

{'traceloop-sdk', 'opentelemetry-instrumentation-psycopg', 'wrapt', 'aiosignal', 'psycopg-c', 'tqdm', 'certifi', 'opentelemetry-instrumentation-pinecone', 'pygments', 'pytest', 'frozenlist', 'pytest-asyncio', 'opentelemetry-instrumentation-cohere', 'mdurl', 'opentelemetry-instrumentation-bedrock', 'gitdb', 'smmap', 'httpx-sse', 'jsonpatch', 'sniffio', 'colorama', 'tabulate', 'opentelemetry-instrumentation-sagemaker', 'langchain-community', 'langchain-openai', 'attrs', 'sse-starlette', 'filelock', 'dataclasses-json', 'gritql', 'markupsafe', 'pytest-rerunfailures', 'langchain', 'opentelemetry-instrumentation-vertexai', 'annotated-types', 'opentelemetry-exporter-otlp-proto-grpc', 'opentelemetry-instrumentation-mistralai', 'requests-toolbelt', 'opentelemetry-instrumentation-together', 'langchain-text-splitters', 'opentelemetry-instrumentation-requests', 'packaging', 'opentelemetry-instrumentation-urllib3', 'sqlmodel', 'mypy-extensions', 'importlib_metadata', 'opentelemetry-semantic-conventions-ai', 'pytest-mock', 'opentelemetry-sdk', 'regex', 'opentelemetry-instrumentation-qdrant', 'pydantic_core', 'opentelemetry-semantic-conventions', 'opentelemetry-instrumentation-chromadb', 'opentelemetry-instrumentation-groq', 'opentelemetry-instrumentation-alephalpha', 'six', 'marshmallow', 'pydantic-settings', 'posthog', 'multidict', 'zipp', 'email_validator', 'python-dateutil', 'starlette', 'googleapis-common-protos', 'opentelemetry-instrumentation-marqo', 'shellingham', 'opentelemetry-instrumentation-llamaindex', 'psycopg', 'opentelemetry-api', 'markdown-it-py', 'yarl', 'ruff', 'charset-normalizer', 'fsspec', 'opentelemetry-instrumentation-logging', 'opentelemetry-instrumentation-fastapi', 'pluggy', 'uvicorn', 'anyio', 'idna', 'opentelemetry-proto', 'opentelemetry-instrumentation-milvus', 'langchain-core', 'opentelemetry-util-http', 'httpcore', 'opentelemetry-instrumentation-google-generativeai', 'fastapi', 'aiohttp', 'anthropic', 'tomlkit', 'opentelemetry-instrumentation-haystack', 'pytest-httpx', 'langserve', 'opentelemetry-exporter-otlp-proto-http', 'opentelemetry-instrumentation-langchain', 'typer', 'sqlalchemy', 'opentelemetry-instrumentation-watsonx', 'typing-inspect', 'opentelemetry-exporter-otlp-proto-common', 'coverage', 'distro', 'opentelemetry-instrumentation-sqlalchemy', 'jsonpointer', 'asgiref', 'opentelemetry-instrumentation-transformers', 'opentelemetry-instrumentation', 'tenacity', 'monotonic', 'deprecated', 'jinja2', 'httpx', 'opentelemetry-instrumentation-dbapi', 'opentelemetry-instrumentation-weaviate', 'urllib3', 'iniconfig', 'tiktoken', 'gitpython', 'pyyaml', 'requests', 'opentelemetry-instrumentation-openai', 'typing_extensions', 'jiter', 'protobuf', 'mako', 'pytest-cov', 'python-dotenv', 'opentelemetry-instrumentation-lancedb', 'propcache', 'huggingface-hub', 'opentelemetry-instrumentation-anthropic', 'rich', 'tokenizers', 'backoff', 'grpcio', 'inflection', 'opentelemetry-instrumentation-ollama', 'orjson', 'opentelemetry-instrumentation-asgi', 'opentelemetry-instrumentation-threading', 'h11', 'openai', 'numpy', 'langchain-cli', 'pydantic', 'opentelemetry-instrumentation-replicate', 'click', 'alembic', 'aiohappyeyeballs', 'langsmith', 'dnspython'}

πŸ‘Ÿ Reproduction steps

Triggered from

from traceloop.sdk.telemetry import Telemetry

πŸ‘ Expected behavior

It should not generate content without the ability to control this / switch it off.

πŸ‘Ž Actual Behavior with Screenshots

See above.

πŸ€– Python Version

3.11.9

πŸ“ƒ Provide any additional context for the Bug.

No response

πŸ‘€ Have you spent some time to check if this bug has been raised before?

Are you willing to submit PR?

None

dosubot[bot] commented 4 hours ago

Hey @damianoneill! I'm here to help you with the Traceloop SDK issue you've encountered. I can assist with bug fixes, answer questions, and guide you through the process of becoming a contributor. Let's tackle this together!

The Traceloop SDK writes content to stdout after updating from version 0.30.0 to 0.33.10 due to several print statements in the init method of the Traceloop class. These statements output messages related to the configuration and status of tracing, metrics, and logging.

To control or disable this behavior, you can modify the source code to remove or comment out the print statements. Alternatively, you could redirect stdout in your application to suppress these messages. Unfortunately, there isn't a built-in configuration option or environment variable in the Traceloop SDK to disable or redirect stdout output directly [1].

To continue talking to Dosu, mention @dosu.