Skip to content

[Regression] urllib3 downstream instrumentation not getting suppressed (with requests, boto3 upstream) #930

@NathanielRN

Description

@NathanielRN

Description

I thought that in #563 I had stopped calls to downstream Python packages from getting instrumented after instrumenting the AWS SDK.

However, my colleague @yimipeng discovered that DynamoDB calls still have HTTP traces from urllib3 when he instruments botocore.

For example, when using OTel Python instrumentation he sees this service map:

no_botocore_suppression

It's not until he adds this line:

ENV OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=urllib3

that he sees the downstream urllib3 traces disappear:

botocore_suppression

His sample app which is already on GitHub is simple too:

flask
boto3
opentelemetry-distro[otlp]>=0.24b0 # This should take the latest 0.28b1, right?
opentelemetry-sdk-extension-aws~=2.0
opentelemetry-propagator-aws-xray~=1.0
FROM public.ecr.aws/amazonlinux/amazonlinux:latest
RUN yum install python3.7 -y && curl -O https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && yum update -y
COPY . /app
WORKDIR /app
RUN pip3 install -r requirements.txt
RUN opentelemetry-bootstrap --action=install
ENV OTEL_RESOURCE_ATTRIBUTES='service.name=movies_app'
CMD OTEL_PROPAGATORS=xray OTEL_PYTHON_ID_GENERATOR=xray opentelemetry-instrument python3 app.py
EXPOSE 8080

In #563 I showed my changes fix this for S3. I wonder if it's possible it's different for DynamoDB? Or if anything else changed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions