opentelemetry-instrumentation-botocore 0.41b0__py3-none-any.whl → 0.43b0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,7 +127,10 @@ class BotocoreInstrumentor(BaseInstrumentor):
127
127
  def _instrument(self, **kwargs):
128
128
  # pylint: disable=attribute-defined-outside-init
129
129
  self._tracer = get_tracer(
130
- __name__, __version__, kwargs.get("tracer_provider")
130
+ __name__,
131
+ __version__,
132
+ kwargs.get("tracer_provider"),
133
+ schema_url="https://opentelemetry.io/schemas/1.11.0",
131
134
  )
132
135
 
133
136
  self.request_hook = kwargs.get("request_hook")
@@ -28,6 +28,7 @@ from opentelemetry.semconv.trace import DbSystemValues, SpanAttributes
28
28
  from opentelemetry.trace.span import Span
29
29
  from opentelemetry.util.types import AttributeValue
30
30
 
31
+ # pylint: disable=invalid-name
31
32
  _AttributePathT = Union[str, Tuple[str]]
32
33
 
33
34
 
@@ -99,13 +99,13 @@ class _OpInvoke(_LambdaOperation):
99
99
  # Lambda extension
100
100
  ################################################################################
101
101
 
102
- _OPERATION_MAPPING = {
102
+ _OPERATION_MAPPING: Dict[str, _LambdaOperation] = {
103
103
  op.operation_name(): op
104
104
  for op in globals().values()
105
105
  if inspect.isclass(op)
106
106
  and issubclass(op, _LambdaOperation)
107
107
  and not inspect.isabstract(op)
108
- } # type: Dict[str, _LambdaOperation]
108
+ }
109
109
 
110
110
 
111
111
  class _LambdaExtension(_AwsSdkExtension):
@@ -81,6 +81,10 @@ class _OpPublish(_SnsOperation):
81
81
  ] = MessagingDestinationKindValues.TOPIC.value
82
82
  attributes[SpanAttributes.MESSAGING_DESTINATION] = destination_name
83
83
 
84
+ # TODO: Use SpanAttributes.MESSAGING_DESTINATION_NAME when opentelemetry-semantic-conventions 0.42b0 is released
85
+ attributes["messaging.destination.name"] = cls._extract_input_arn(
86
+ call_context
87
+ )
84
88
  call_context.span_name = (
85
89
  f"{'phone_number' if is_phone_number else destination_name} send"
86
90
  )
@@ -139,13 +143,13 @@ class _OpPublishBatch(_OpPublish):
139
143
  # SNS extension
140
144
  ################################################################################
141
145
 
142
- _OPERATION_MAPPING = {
146
+ _OPERATION_MAPPING: Dict[str, _SnsOperation] = {
143
147
  op.operation_name(): op
144
148
  for op in globals().values()
145
149
  if inspect.isclass(op)
146
150
  and issubclass(op, _SnsOperation)
147
151
  and not inspect.isabstract(op)
148
- } # type: Dict[str, _SnsOperation]
152
+ }
149
153
 
150
154
 
151
155
  class _SnsExtension(_AwsSdkExtension):
@@ -57,23 +57,21 @@ class _AwsSdkCallContext:
57
57
  boto_meta = client.meta
58
58
  service_model = boto_meta.service_model
59
59
 
60
- self.service = service_model.service_name.lower() # type: str
61
- self.operation = operation # type: str
62
- self.params = params # type: Dict[str, Any]
60
+ self.service = service_model.service_name.lower()
61
+ self.operation = operation
62
+ self.params = params
63
63
 
64
64
  # 'operation' and 'service' are essential for instrumentation.
65
65
  # for all other attributes we extract them defensively. All of them should
66
66
  # usually exist unless some future botocore version moved things.
67
- self.region = self._get_attr(
68
- boto_meta, "region_name"
69
- ) # type: Optional[str]
70
- self.endpoint_url = self._get_attr(
67
+ self.region: Optional[str] = self._get_attr(boto_meta, "region_name")
68
+ self.endpoint_url: Optional[str] = self._get_attr(
71
69
  boto_meta, "endpoint_url"
72
- ) # type: Optional[str]
70
+ )
73
71
 
74
- self.api_version = self._get_attr(
72
+ self.api_version: Optional[str] = self._get_attr(
75
73
  service_model, "api_version"
76
- ) # type: Optional[str]
74
+ )
77
75
  # name of the service in proper casing
78
76
  self.service_id = str(
79
77
  self._get_attr(service_model, "service_id", self.service)
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "0.41b0"
15
+ __version__ = "0.43b0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: opentelemetry-instrumentation-botocore
3
- Version: 0.41b0
3
+ Version: 0.43b0
4
4
  Summary: OpenTelemetry Botocore instrumentation
5
5
  Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-botocore
6
6
  Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors@lists.cncf.io>
@@ -18,16 +18,17 @@ Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Requires-Python: >=3.7
20
20
  Requires-Dist: opentelemetry-api~=1.12
21
- Requires-Dist: opentelemetry-instrumentation==0.41b0
21
+ Requires-Dist: opentelemetry-instrumentation==0.43b0
22
22
  Requires-Dist: opentelemetry-propagator-aws-xray==1.0.1
23
- Requires-Dist: opentelemetry-semantic-conventions==0.41b0
23
+ Requires-Dist: opentelemetry-semantic-conventions==0.43b0
24
24
  Provides-Extra: instruments
25
25
  Requires-Dist: botocore~=1.0; extra == 'instruments'
26
26
  Provides-Extra: test
27
+ Requires-Dist: botocore<1.31.81,~=1.0; extra == 'test'
27
28
  Requires-Dist: markupsafe==2.0.1; extra == 'test'
28
29
  Requires-Dist: moto[all]~=2.2.6; extra == 'test'
29
30
  Requires-Dist: opentelemetry-instrumentation-botocore[instruments]; extra == 'test'
30
- Requires-Dist: opentelemetry-test-utils==0.41b0; extra == 'test'
31
+ Requires-Dist: opentelemetry-test-utils==0.43b0; extra == 'test'
31
32
  Description-Content-Type: text/x-rst
32
33
 
33
34
  OpenTelemetry Botocore Tracing
@@ -1,15 +1,15 @@
1
- opentelemetry/instrumentation/botocore/__init__.py,sha256=PpmBZmiG0_LJ1gRgkkUHPbP8_CDmD9MKx1PfFu1bWEg,10416
1
+ opentelemetry/instrumentation/botocore/__init__.py,sha256=Ke6-ksTwnV_uUF3UmkzoDIC39_spSWGh4SlIu5yDGuI,10507
2
2
  opentelemetry/instrumentation/botocore/package.py,sha256=6xvfRpU_C3wlSO6pto7MhGtkPoCHDEiRO_Fh4DiC_50,622
3
- opentelemetry/instrumentation/botocore/version.py,sha256=9LtSy_KpXBRCK2aaMFk3l5qiAoEDLs7boZzuBeF3mPY,608
3
+ opentelemetry/instrumentation/botocore/version.py,sha256=jfcIUyuDoM4wISRi0ztCwV0F1WM36SO4vTtcSU3ZXLg,608
4
4
  opentelemetry/instrumentation/botocore/extensions/__init__.py,sha256=nQGZ4Clq4d2eIeDK6v0IqQVJ6SIIBpzm57DJGXgL9TA,1665
5
5
  opentelemetry/instrumentation/botocore/extensions/_messaging.py,sha256=VqNJGE-6fEA-96q97tlKXL3Iros8H9tBxFoy_i2LP1Y,1635
6
- opentelemetry/instrumentation/botocore/extensions/dynamodb.py,sha256=Dz50Orrdlj4cb6p5URX3OJJooGhQKdhm7tDDgwSQqkA,13523
7
- opentelemetry/instrumentation/botocore/extensions/lmbd.py,sha256=1ImTjvzzvX71h94TykZxMkrwIbnnVFii3u7VPQ0k21w,4159
8
- opentelemetry/instrumentation/botocore/extensions/sns.py,sha256=K7BPWCwjezVGT__7HaLwYl6rwmU_9rWSbtUqQo9gWI0,5135
6
+ opentelemetry/instrumentation/botocore/extensions/dynamodb.py,sha256=BA-zoY-Cr878t5Q3pYS3r1PKAd4FFBtdTCXZLoC3tLE,13554
7
+ opentelemetry/instrumentation/botocore/extensions/lmbd.py,sha256=Lk3AoGiMNfYiHbfp16A5UXYgpoOgo0sNuuEYJN3QDSo,4151
8
+ opentelemetry/instrumentation/botocore/extensions/sns.py,sha256=zlvw25Z8UfaXyangAu_2nVvXHRGGPWrd0WbmJTk3cRM,5358
9
9
  opentelemetry/instrumentation/botocore/extensions/sqs.py,sha256=F0spQ9P4HmhW4pwldFoAIC9mt9Q7Rad3-0h9lGE0Nac,2789
10
- opentelemetry/instrumentation/botocore/extensions/types.py,sha256=mIK1fKhdi_E_9NPfgDjPGwUJQ7ffrbZNl_W-3XgABs0,4953
11
- opentelemetry_instrumentation_botocore-0.41b0.dist-info/METADATA,sha256=QieSSaq5pdg-EiQR8CuLQpqYrtlBg6wkr_x8ErpndV0,2253
12
- opentelemetry_instrumentation_botocore-0.41b0.dist-info/WHEEL,sha256=KGYbc1zXlYddvwxnNty23BeaKzh7YuoSIvIMO4jEhvw,87
13
- opentelemetry_instrumentation_botocore-0.41b0.dist-info/entry_points.txt,sha256=v5hzQbZMJ61JuhBNq5jHYAapvv3C_486h9CTqxlkUTM,100
14
- opentelemetry_instrumentation_botocore-0.41b0.dist-info/licenses/LICENSE,sha256=h8jwqxShIeVkc8vOo9ynxGYW16f4fVPxLhZKZs0H5U8,11350
15
- opentelemetry_instrumentation_botocore-0.41b0.dist-info/RECORD,,
10
+ opentelemetry/instrumentation/botocore/extensions/types.py,sha256=JWSXOP3KC6WRXbWG4EQczDDjaYhpq2HzTisUZn9e0m4,4857
11
+ opentelemetry_instrumentation_botocore-0.43b0.dist-info/METADATA,sha256=r6zqpAZYfbsnqAxmhelmvIB_JL0TmwAtS-D7qG0VoYI,2308
12
+ opentelemetry_instrumentation_botocore-0.43b0.dist-info/WHEEL,sha256=KGYbc1zXlYddvwxnNty23BeaKzh7YuoSIvIMO4jEhvw,87
13
+ opentelemetry_instrumentation_botocore-0.43b0.dist-info/entry_points.txt,sha256=v5hzQbZMJ61JuhBNq5jHYAapvv3C_486h9CTqxlkUTM,100
14
+ opentelemetry_instrumentation_botocore-0.43b0.dist-info/licenses/LICENSE,sha256=h8jwqxShIeVkc8vOo9ynxGYW16f4fVPxLhZKZs0H5U8,11350
15
+ opentelemetry_instrumentation_botocore-0.43b0.dist-info/RECORD,,