getsentry / getsentry/sentry-python

ref(boto3): Own one logical botocore client-call lifecycle

Aperta
#7,474 1 commento 0 reazioni 1 assegnatario Rivendicata da @pabloDeputter Vedi su GitHub
Python
Lingua principale
Python
Stelle
2.2k
Fork
669
Merge medio
1g 1h
PR unite (30g)
213

Descrizione

### Problem

* spans are currently created in `request-created`. Botocore may emit this during retries; it's also too late to cover any failures during operation lookup, parameter construction, serialization, or other work before an HTTP request exists.

### Proposed Solution

* patch `BaseClient._make_api_call` as [OTel]() does; one logical client span should cover all retries until response, error, or cancellation.
* wrapper is the only owner of the aws client span's start and completion.
* `_AwsCallContext` can be used to contain generic data such botocore client, service name, operation name, region, endpoint URL, etc

#### Sources

* [https://opentelemetry.io/docs/specs/semconv/rpc/rpc-spans/#rpc-client-span]()
* [https://github.com/boto/botocore/blob/develop/botocore/client.py]()
* [https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/__init__.py]()

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.