Comments (4)
Hey @vastin.
I notice that this PR pinned the pynamodb
version to < 6.0.0.
Do you know if this test failure was the reason for it? Looks like we get a child subsegment for pynamodb
instrumentation for v6.x. from the above exception.
from aws-xray-sdk-python.
Ran a quick CI with latest version of pynamodb and below is the complete log from https://github.com/aws/aws-xray-sdk-python/actions/runs/9554477432/job/26335605912?pr=437
2024-06-17T20:44:34.0593304Z py311-ext-pynamodb create: /home/runner/work/aws-xray-sdk-python/aws-xray-sdk-python/.tox/py311-ext-pynamodb
2024-06-17T20:44:34.3115979Z py311-ext-pynamodb installdeps: pytest > 3.0.0, pytest-benchmark, coverage == 4.5.4, codecov, wrapt, pytest-asyncio == 0.21.2, setuptools, pynamodb >=3.3.1
2024-06-17T20:44:38.5407472Z py311-ext-pynamodb inst: /home/runner/work/aws-xray-sdk-python/aws-xray-sdk-python/.tox/.tmp/package/1/aws_xray_sdk-2.14.0.zip
2024-06-17T20:44:40.1294339Z py311-ext-pynamodb installed: aws-xray-sdk @ file:///home/runner/work/aws-xray-sdk-python/aws-xray-sdk-python/.tox/.tmp/package/1/aws_xray_sdk-2.14.0.zip#sha256=274729707a3897ea598f8e728d4498ebd51e54e67882819da1760de706b75633,botocore==1.34.128,certifi==2024.6.2,charset-normalizer==3.3.2,codecov==2.1.13,coverage==4.5.4,idna==3.7,iniconfig==2.0.0,jmespath==1.0.1,packaging==24.1,pluggy==1.5.0,py-cpuinfo==9.0.0,pynamodb==6.0.1,pytest==8.2.2,pytest-asyncio==0.21.2,pytest-benchmark==4.0.0,python-dateutil==2.9.0.post0,requests==2.32.3,six==1.16.0,urllib3==2.2.2,wrapt==1.16.0
2024-06-17T20:44:40.1300156Z py311-ext-pynamodb run-test-pre: PYTHONHASHSEED='3828464059'
2024-06-17T20:44:40.1301409Z py311-ext-pynamodb run-test: commands[0] | coverage erase
2024-06-17T20:44:40.2000254Z py311-ext-pynamodb run-test: commands[1] | coverage run --append --source aws_xray_sdk -m pytest tests/ext/pynamodb
2024-06-17T20:44:41.5002191Z ============================= test session starts ==============================
2024-06-17T20:44:41.5003884Z platform linux -- Python 3.11.9, pytest-8.2.2, pluggy-1.5.0
2024-06-17T20:44:41.5005088Z cachedir: .tox/py311-ext-pynamodb/.pytest_cache
2024-06-17T20:44:41.5007019Z benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
2024-06-17T20:44:41.5009446Z rootdir: /home/runner/work/aws-xray-sdk-python/aws-xray-sdk-python
2024-06-17T20:44:41.5010598Z plugins: benchmark-4.0.0, asyncio-0.21.2
2024-06-17T20:44:41.5011734Z asyncio: mode=Mode.STRICT
2024-06-17T20:44:41.5012584Z collected 3 items
2024-06-17T20:44:41.5012924Z
2024-06-17T20:44:42.4364136Z tests/ext/pynamodb/test_pynamodb.py F.. [100%]
2024-06-17T20:44:42.4365956Z
2024-06-17T20:44:42.4366344Z =================================== FAILURES ===================================
2024-06-17T20:44:42.4367449Z ________________________________ test_exception ________________________________
2024-06-17T20:44:42.4368284Z
2024-06-17T20:44:42.4368550Z def test_exception():
2024-06-17T20:44:42.4369881Z class SampleModel(Model):
2024-06-17T20:44:42.4370623Z class Meta:
2024-06-17T20:44:42.4371649Z region = 'us-west-2'
2024-06-17T20:44:42.4372468Z table_name = 'mytable'
2024-06-17T20:44:42.4373143Z
2024-06-17T20:44:42.4373898Z sample_attribute = UnicodeAttribute(hash_key=True)
2024-06-17T20:44:42.4374759Z
2024-06-17T20:44:42.4375256Z try:
2024-06-17T20:44:42.4375911Z SampleModel.describe_table()
2024-06-17T20:44:42.4376657Z except Exception:
2024-06-17T20:44:42.4377285Z pass
2024-06-17T20:44:42.4377862Z
2024-06-17T20:44:42.4378566Z subsegments = xray_recorder.current_segment().subsegments
2024-06-17T20:44:42.4380141Z assert len(subsegments) == 1
2024-06-17T20:44:42.4381342Z subsegment = subsegments[0]
2024-06-17T20:44:42.4382244Z assert subsegment.name == 'dynamodb'
2024-06-17T20:44:42.4383146Z > assert len(subsegment.subsegments) == 0
2024-06-17T20:44:42.4383996Z E assert 1 == 0
2024-06-17T20:44:42.4385104Z E + where 1 = len([<aws_xray_sdk.core.models.subsegment.Subsegment object at 0x7f60982e0650>])
2024-06-17T20:44:42.4387478Z E + where [<aws_xray_sdk.core.models.subsegment.Subsegment object at 0x7f60982e0650>] = <aws_xray_sdk.core.models.subsegment.Subsegment object at 0x7f6097380190>.subsegments
2024-06-17T20:44:42.4426618Z
2024-06-17T20:44:42.4427088Z tests/ext/pynamodb/test_pynamodb.py:48: AssertionError
2024-06-17T20:44:42.4428075Z =========================== short test summary info ============================
2024-06-17T20:44:42.4429519Z FAILED tests/ext/pynamodb/test_pynamodb.py::test_exception - assert 1 == 0
2024-06-17T20:44:42.4430801Z ========================= 1 failed, 2 passed in 1.66s ==========================
2024-06-17T20:44:42.5152963Z ERROR: InvocationError for command /home/runner/work/aws-xray-sdk-python/aws-xray-sdk-python/.tox/py311-ext-pynamodb/bin/coverage run --append --source aws_xray_sdk -m pytest tests/ext/pynamodb (exited with code 1)
from aws-xray-sdk-python.
Hi @yan12125 , other than the failing unit test, is there any issue with the instrumentation of pynamodb
v6.x that you noticed? If the instrumentation is working, can you attach to this issue, the raw trace data (json) for a sample trace for further analysis?
from aws-xray-sdk-python.
I don't actually use aws-xray-sdk with pynamodb. I'm the maintainer of python-aws-xray-sdk package in Arch Linux, and tests are run to check compatibility with dependencies.
from aws-xray-sdk-python.
Related Issues (20)
- EKSPlugin HOT 1
- Very rare ReferenceError HOT 2
- Support for psycopg3 HOT 2
- Link a Textract async operation with downstream process HOT 1
- Current tox versions do not like how testenv.passenv is set
- aws_xray_sdk.core.exceptions.exceptions.SegmentNameMissingException: Segment name is required. HOT 1
- Using psycopg2 connection_factory throws exceptions HOT 4
- Documentation for patch_all HOT 2
- Sampling configuration should discuss DefaultSampler vs. LocalSampler HOT 1
- Flask middleware errors when an earlier Flask extension throws an exception in a before_request method HOT 1
- Patched DB cursor and template may record outside of XRayMiddleware HOT 2
- Segment not propgated when subsegment metadata is sufficiently long HOT 4
- sqlalchemy_core patch errors for unencoded special characters in db url HOT 1
- Error when using AsyncContext in python 3.11.5 HOT 3
- MongoDB AttributeError: 'NoneType' object has no attribute 'put_annotation'
- aws-xray-sdk-python compatibility with Python 3.12 HOT 9
- Fix docstring in Entity.close() HOT 1
- No supported for fastAPI, need to add middleware for fastapi HOT 1
- trace simple websocket messages - python HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-xray-sdk-python.