ERROR: cannot find the current segment/subsegment when segment is open and uploading file to s3.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- aws, python
- Ambito
- cloud, observability-sre
Direzione di ricerca
Riproduci lo snippet fornito con Python 3.9, botocore 1.29.50 e aws_xray_sdk 2.11.0. Confronta il contesto del segmento durante le chiamate S3 a upload_file con le chiamate funzionanti a put_object; il lavoro è completato quando i caricamenti non segnalano più l'assenza del segmento corrente e continuano a essere rappresentati nei dati del segmento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Currently using python version 3.9, botocore version 1.29.50, aws_xray_sdk version 2.11.0
When I run the code snippet below I get an error saying there's no open segment for the calls the use upload file. The subsequent calls using put_object have no issues and show up in the segment data. Logging the trace_id was also successful.
patch_all()
xray_recorder.configure(context_missing='LOG_ERROR', daemon_address='localhost:2000')
segment = xray_recorder.begin_segment('test segment')
s3_resource = boto3.resource("s3")
# These give the error
s3_resource.Bucket('resultfiles-test' ).upload_file('hello_world.txt', 'hello_world.txt')
logger.info(f'trace_id: {xray_recorder.current_segment().trace_id}')
s3_resource.Object('resultfiles-test', 'hello_world.txt').upload_file(Filename='hello_world.txt')
logger.info(f'trace_id: {xray_recorder.current_segment().trace_id}')
# These work
s3_resource.Bucket('resultfiles-test' ).put_object(Key='hello_world.txt', Body=b'hello world')
s3_resource.Object('resultfiles-test', 'hello_world.txt').put(Body=b'hello_world.txt')
with open('hello_world.txt', 'r') as f:
s3_resource.Object('resultfiles-test', 'hello_world.txt').put(Body=f.read())
xray_recorder.end_segment()
- Lingua principale
- Python
- Stelle
- 339
- Fork
- 147
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aws/aws-xray-sdk-python
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
aws/aws-xray-sdk-python#490 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
aws/aws-xray-sdk-python#460 ·
-
Next release Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
aws/aws-xray-sdk-python#457 · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
aws/aws-xray-sdk-python#453 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
aws/aws-xray-sdk-python#452 · 1 reazione ·
Tutte le issue di aws/aws-xray-sdk-python
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
stephrobert/dsoxlab#238 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
sublimehq/package_control#1780 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
nwg-piotr/nwg-displays#145 ·