You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a container running a simple application running on a k8s pod (code attached below).
The application emits the logs messages through stderr when running.
When instrumentation is attached to it, the logs are streamed to the backend, as expected.
Yet, the application stops emitting logs through stderr.
Application code
import logging
import random
import time
random.seed(time.time_ns())
app_name = f'app_{random.randint(1, 100)}'
logger = logging.getLogger(f"{app_name}_logger")
for i in range(3000):
sleep_ms = 10 * random.randint(1, 100)
logger.warning(f"Python app '{app_name}' sleeping for {sleep_ms} ms")
time.sleep(sleep_ms / 1000)
Dockerfile
FROM python:3.9.6
WORKDIR /usr/app
RUN python -m venv /usr/app/venv
ENV PATH="/usr/app/venv/bin:$PATH"
COPY ./requirements.txt .
RUN pip install -r requirements.txt
COPY ./app .
CMD ["python", "-u", "./app.py"]
Steps to Reproduce
Build app, deploy on k8s.
Expected Result
Logs should be streamed through stderr even when the application is instrumented.
Actual Result
Logs are not produced to stderr when the app is instrumented using auto-instrumentation.
Additional context
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered:
Describe your environment
OS: (e.g, Ubuntu)
Python version: (e.g., Python 3.8.10)
Instrumentation image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.46b0
What happened?
I have a container running a simple application running on a
k8s pod
(code attached below).The application emits the logs messages through
stderr
when running.When instrumentation is attached to it, the logs are streamed to the backend, as expected.
Yet, the application stops emitting logs through
stderr
.Application code
Dockerfile
Steps to Reproduce
Build app, deploy on k8s.
Expected Result
Logs should be streamed through
stderr
even when the application is instrumented.Actual Result
Logs are not produced to
stderr
when the app is instrumented using auto-instrumentation.Additional context
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: