Open xwgao opened 9 months ago
These types of issues with python auto instrumentation and the operator are almost always an issue with your apps packages not being compatible with Pythons auto instrumentation.
Some things to try:
@TylerHelmuth Is there any way to ignore or bypass this error using the operator? Thanks.
@TylerHelmuth I added the env var OTEL_PYTHON_DISABLED_INSTRUMENTATIONS
(value: sqlite3
) into my deployment, then after the pod restarted, the error was gone. But I still can not find any trace (span) collected for my Python service. Any idea about this? Thanks.
I added the env var OTEL_PYTHON_DISABLED_INSTRUMENTATIONS (value: sqlite3) into my deployment,
Note that the env var can be as well added to the env
field of the instrumentation CR.
I am not sure why your app is not producing any data.
I resolved the sqlite3
error and opened another github issue https://github.com/open-telemetry/opentelemetry-python/issues/3573. Can any one help on this? Thanks a lot.
I resolved the sqlite3
error and opened another github issue open-telemetry/opentelemetry-python#3573. Can any one help on this? Thanks a lot.
How did you resolve this issue? For us disabling instrumentation for sqlite3 only helped in removal of the error , but the log instrumentation still doesn't work, here is my instrumentation crd spec
spec:
apacheHttpd:
configPath: /usr/local/apache2/conf
version: '2.4'
dotnet:
image: >-
ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:0.5.0
env:
- name: OTEL_EXPORTER_OTLP_TIMEOUT
value: '200'
- name: OTEL_LOGS_EXPORTER
value: otlp_proto_http
- name: OTEL_EXPORTER_OTLP_HTTP_LOGS_ENDPOINT
value: >-
http://obs-gateway-collector.test.svc.cluster.local:4318/v1/logs
exporter:
endpoint: >-
http://obs-python-collector.test.svc.cluster.local:4318
java:
image: >-
ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:1.31.0
nodejs:
image: >-
ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:0.34.0
python:
env:
- name: OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED
value: 'true'
- name: OTEL_PYTHON_LOG_LEVEL
value: debug
image: >-
ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.44b0
resource: {}
sampler:
type: always_on
Component(s)
instrumentation
What happened?
Description
I installed Community OpenTelemetry Operator 0.89.0 in my OpenShift 4.12.22 cluster. I created an OpenTelemetry instrumentation and collector in my namespace. And add annotation
instrumentation.opentelemetry.io/inject-python: "instrumentation"
in my deployment (which uses Python technology) in the namespace. Then after the pod restarted, I found the error messages below from the pod log.Steps to Reproduce
Create an OpenTelemetry collector as below.
Expected Result
The Python auto-instrumentation works well in my pod container.
Actual Result
The Python auto-instrumentation failed to be auto initialized for
'_sqlite3' module not found
error.Kubernetes Version
v1.25.10+8c21020
Operator version
0.89.0
Collector version
0.89.0
Environment information
Environment
Platform: OpenShift 4.12.22 cluster Python3 version: Python 3.9.16
Log output
Additional context
No response