getsentry / getsentry/sentry-python

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

未关闭
#7,474 1 条评论 0 个 reaction 已指派 1 人 已被 @pabloDeputter 认领 在 GitHub 查看
Python
主要语言
Python
星标
2.2k
派生
669
平均合并
1 天 1 小时
30 天内合并 PR
213

描述

### 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]()

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。