Skip to content

Commit 9d75297

Browse files
Merge pull request #49 from singlestore-labs/aanshu/044
Fix otel log export
2 parents 3ab4869 + 49ca1d8 commit 9d75297

File tree

7 files changed

+4
-3
lines changed

7 files changed

+4
-3
lines changed
-12.4 KB
Binary file not shown.
-18.6 KB
Binary file not shown.
12.4 KB
Binary file not shown.
18.6 KB
Binary file not shown.

pulse_otel/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def __init__(
204204
A LoggingHandler is then created, configured to capture logs at the DEBUG level and to use the custom logger provider. The Python logging system is configured via logging.basicConfig to use this handler and to set the root logger’s level to INFO. This means all logs at INFO level or higher will be processed and sent to the OTLP collector, while the handler itself is capable of handling DEBUG logs if needed.
205205
"""
206206
handler = LoggingHandler(level=logging.DEBUG, logger_provider=log_provider)
207+
logging.root.addHandler(handler)
207208

208209
"""
209210
In Python logging, both the logger and the handler have their own log levels, and both levels must be satisfied for a log record to be processed and exported.
@@ -214,7 +215,7 @@ def __init__(
214215
2. Root Logger Level (logging.basicConfig(level=logging.INFO, ...)):
215216
This sets the minimum level for the root logger. Only log records at INFO level and above will be passed from the logger to the handler.
216217
"""
217-
logging.basicConfig(level=logging.INFO, handlers=[handler])
218+
logging.basicConfig(level=logging.INFO)
218219

219220
Traceloop.init(
220221
disable_batch=True,

reinstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ set -e
33

44
python3 setup.py sdist bdist_wheel
55
pip uninstall singlestore_pulse -y
6-
pip install dist/singlestore_pulse-0.4.3-py3-none-any.whl
6+
pip install dist/singlestore_pulse-0.4.4-py3-none-any.whl
77
# pytest -v --tb=short

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name='singlestore_pulse',
8-
version='0.4.3',
8+
version='0.4.4',
99
packages=find_packages(),
1010
description='Singlestore Python SDK for OpenTelemetry Integration',
1111
long_description=open('README.md').read(),

0 commit comments

Comments
 (0)