grpcio-observability 1.73.1__cp310-cp310-linux_armv7l.whl → 1.74.0rc1__cp310-cp310-linux_armv7l.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.
- grpc_observability/_cyobservability.cpython-310-arm-linux-gnueabihf.so +0 -0
- grpc_observability/_observability.py +11 -10
- grpc_observability/_observability_config.py +3 -2
- grpc_observability/_open_census_exporter.py +7 -7
- grpc_observability/_open_telemetry_observability.py +4 -4
- grpc_observability/_views.py +4 -4
- {grpcio_observability-1.73.1.dist-info → grpcio_observability-1.74.0rc1.dist-info}/METADATA +2 -2
- grpcio_observability-1.74.0rc1.dist-info/RECORD +15 -0
- grpcio_observability-1.73.1.dist-info/RECORD +0 -15
- {grpcio_observability-1.73.1.dist-info → grpcio_observability-1.74.0rc1.dist-info}/LICENSE +0 -0
- {grpcio_observability-1.73.1.dist-info → grpcio_observability-1.74.0rc1.dist-info}/WHEEL +0 -0
- {grpcio_observability-1.73.1.dist-info → grpcio_observability-1.74.0rc1.dist-info}/top_level.txt +0 -0
Binary file
|
@@ -17,27 +17,27 @@ import abc
|
|
17
17
|
from dataclasses import dataclass
|
18
18
|
from dataclasses import field
|
19
19
|
import enum
|
20
|
-
from typing import
|
20
|
+
from typing import Dict, List, Mapping, Set, Tuple, Union
|
21
21
|
|
22
22
|
|
23
23
|
class Exporter(metaclass=abc.ABCMeta):
|
24
24
|
"""Abstract base class for census data exporters."""
|
25
25
|
|
26
26
|
@abc.abstractmethod
|
27
|
-
def export_stats_data(self, stats_data: List[
|
28
|
-
"""Exports a list of
|
27
|
+
def export_stats_data(self, stats_data: List[StatsData]) -> None:
|
28
|
+
"""Exports a list of StatsData objects to the exporter's destination.
|
29
29
|
|
30
30
|
Args:
|
31
|
-
stats_data: A list of
|
31
|
+
stats_data: A list of StatsData objects to export.
|
32
32
|
"""
|
33
33
|
raise NotImplementedError()
|
34
34
|
|
35
35
|
@abc.abstractmethod
|
36
|
-
def export_tracing_data(self, tracing_data: List[
|
37
|
-
"""Exports a list of
|
36
|
+
def export_tracing_data(self, tracing_data: List[TracingData]) -> None:
|
37
|
+
"""Exports a list of TracingData objects to the exporter's destination.
|
38
38
|
|
39
39
|
Args:
|
40
|
-
tracing_data: A list of
|
40
|
+
tracing_data: A list of TracingData objects to export.
|
41
41
|
"""
|
42
42
|
raise NotImplementedError()
|
43
43
|
|
@@ -62,12 +62,13 @@ class StatsData:
|
|
62
62
|
in stubs.
|
63
63
|
"""
|
64
64
|
|
65
|
-
|
65
|
+
# type disabled reason: forward reference, circular import.
|
66
|
+
name: "grpc_observability._cyobservability.MetricsName" # pytype: disable=name-error
|
66
67
|
measure_double: bool
|
67
68
|
value_int: int = 0
|
68
69
|
value_float: float = 0.0
|
69
70
|
include_exchange_labels: bool = False
|
70
|
-
labels: Dict[str,
|
71
|
+
labels: Dict[str, Union[str, bytes]] = field(default_factory=dict)
|
71
72
|
identifiers: Set[str] = field(default_factory=set)
|
72
73
|
registered_method: bool = False
|
73
74
|
|
@@ -108,7 +109,7 @@ class TracingData:
|
|
108
109
|
status: str
|
109
110
|
should_sample: bool
|
110
111
|
child_span_count: int
|
111
|
-
span_labels: Mapping[str,
|
112
|
+
span_labels: Mapping[str, Union[str, bytes]] = field(default_factory=dict)
|
112
113
|
span_annotations: List[Tuple[str, str]] = field(default_factory=list)
|
113
114
|
|
114
115
|
|
@@ -72,10 +72,11 @@ def read_config() -> GcpObservabilityConfig:
|
|
72
72
|
if not config.project_id:
|
73
73
|
# Get project ID from GCP environment variables since project ID was not
|
74
74
|
# set it in the GCP observability config.
|
75
|
-
|
76
|
-
if not
|
75
|
+
project_id = _get_gcp_project_id_from_env_var()
|
76
|
+
if not project_id:
|
77
77
|
# Could not find project ID from GCP environment variables either.
|
78
78
|
raise ValueError("GCP Project ID not found.")
|
79
|
+
config.project_id = project_id
|
79
80
|
return config
|
80
81
|
|
81
82
|
|
@@ -203,7 +203,7 @@ class OpenCensusExporter(_observability.Exporter):
|
|
203
203
|
|
204
204
|
|
205
205
|
def _get_span_annotations(
|
206
|
-
span_annotations: List[Tuple[str, str]]
|
206
|
+
span_annotations: List[Tuple[str, str]],
|
207
207
|
) -> List[time_event.Annotation]:
|
208
208
|
annotations = []
|
209
209
|
|
@@ -279,9 +279,9 @@ def _get_span_data(
|
|
279
279
|
name=span_data.name,
|
280
280
|
context=span_context,
|
281
281
|
span_id=span_data.span_id,
|
282
|
-
parent_span_id=
|
283
|
-
|
284
|
-
|
282
|
+
parent_span_id=(
|
283
|
+
span_data.parent_span_id if span_data.parent_span_id else None
|
284
|
+
),
|
285
285
|
attributes=span_attributes,
|
286
286
|
start_time=span_data.start_time,
|
287
287
|
end_time=span_data.end_time,
|
@@ -291,9 +291,9 @@ def _get_span_data(
|
|
291
291
|
message_events=None,
|
292
292
|
links=None,
|
293
293
|
status=span_status,
|
294
|
-
same_process_as_parent_span=
|
295
|
-
|
296
|
-
|
294
|
+
same_process_as_parent_span=(
|
295
|
+
True if span_data.parent_span_id else None
|
296
|
+
),
|
297
297
|
span_kind=span.SpanKind.UNSPECIFIED,
|
298
298
|
)
|
299
299
|
]
|
@@ -142,7 +142,7 @@ class _OpenTelemetryPlugin:
|
|
142
142
|
elif isinstance(recorder, Histogram):
|
143
143
|
recorder.record(value, attributes=decoded_labels)
|
144
144
|
|
145
|
-
def maybe_record_stats_data(self, stats_data:
|
145
|
+
def maybe_record_stats_data(self, stats_data: StatsData) -> None:
|
146
146
|
# Records stats data to MeterProvider.
|
147
147
|
if self._should_record(stats_data):
|
148
148
|
self._record_stats_data(stats_data)
|
@@ -359,18 +359,18 @@ class OpenTelemetryObservability(grpc._observability.ObservabilityPlugin):
|
|
359
359
|
|
360
360
|
_exporter: "grpc_observability.Exporter"
|
361
361
|
_plugins: List[_OpenTelemetryPlugin]
|
362
|
-
|
362
|
+
_registered_methods: Set[bytes]
|
363
363
|
_client_option_activated: bool
|
364
364
|
_server_option_activated: bool
|
365
365
|
|
366
366
|
def __init__(
|
367
367
|
self,
|
368
368
|
*,
|
369
|
-
plugins:
|
369
|
+
plugins: Iterable[_OpenTelemetryPlugin],
|
370
370
|
):
|
371
371
|
self._exporter = _OpenTelemetryExporterDelegator(plugins)
|
372
372
|
self._registered_methods = set()
|
373
|
-
self._plugins = plugins
|
373
|
+
self._plugins = list(plugins)
|
374
374
|
self._client_option_activated = False
|
375
375
|
self._server_option_activated = False
|
376
376
|
|
grpc_observability/_views.py
CHANGED
@@ -178,7 +178,7 @@ def client_api_latency(labels: Mapping[str, str]) -> view_module.View:
|
|
178
178
|
|
179
179
|
|
180
180
|
def client_sent_compressed_message_bytes_per_rpc(
|
181
|
-
labels: Mapping[str, str]
|
181
|
+
labels: Mapping[str, str],
|
182
182
|
) -> view_module.View:
|
183
183
|
view = view_module.View(
|
184
184
|
"grpc.io/client/sent_compressed_message_bytes_per_rpc",
|
@@ -193,7 +193,7 @@ def client_sent_compressed_message_bytes_per_rpc(
|
|
193
193
|
|
194
194
|
|
195
195
|
def client_received_compressed_message_bytes_per_rpc(
|
196
|
-
labels: Mapping[str, str]
|
196
|
+
labels: Mapping[str, str],
|
197
197
|
) -> view_module.View:
|
198
198
|
view = view_module.View(
|
199
199
|
"grpc.io/client/received_compressed_message_bytes_per_rpc",
|
@@ -234,7 +234,7 @@ def server_completed_rpcs(labels: Mapping[str, str]) -> view_module.View:
|
|
234
234
|
|
235
235
|
|
236
236
|
def server_sent_compressed_message_bytes_per_rpc(
|
237
|
-
labels: Mapping[str, str]
|
237
|
+
labels: Mapping[str, str],
|
238
238
|
) -> view_module.View:
|
239
239
|
view = view_module.View(
|
240
240
|
"grpc.io/server/sent_compressed_message_bytes_per_rpc",
|
@@ -249,7 +249,7 @@ def server_sent_compressed_message_bytes_per_rpc(
|
|
249
249
|
|
250
250
|
|
251
251
|
def server_received_compressed_message_bytes_per_rpc(
|
252
|
-
labels: Mapping[str, str]
|
252
|
+
labels: Mapping[str, str],
|
253
253
|
) -> view_module.View:
|
254
254
|
view = view_module.View(
|
255
255
|
"grpc.io/server/received_compressed_message_bytes_per_rpc",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: grpcio-observability
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.74.0rc1
|
4
4
|
Summary: gRPC Python observability package
|
5
5
|
Home-page: https://grpc.io
|
6
6
|
Author: The gRPC Authors
|
@@ -15,7 +15,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
15
15
|
Requires-Python: >=3.9
|
16
16
|
Description-Content-Type: text/x-rst
|
17
17
|
License-File: LICENSE
|
18
|
-
Requires-Dist: grpcio ==1.
|
18
|
+
Requires-Dist: grpcio ==1.74.0rc1
|
19
19
|
Requires-Dist: setuptools >=59.6.0
|
20
20
|
Requires-Dist: opentelemetry-api >=1.21.0
|
21
21
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
grpc_observability/__init__.py,sha256=H8-SPp2DazGSUWyGYhzdwoRC9IPtkN1oPwwzttWFTlg,688
|
2
|
+
grpc_observability/_cyobservability.cpython-310-arm-linux-gnueabihf.so,sha256=2ZrLmQ7ZR40R5sD9AT-QiSsktZho89aJEk3xxHxKXhA,570872
|
3
|
+
grpc_observability/_measures.py,sha256=uzCLBz677MYV4UmR3gOQ0443iEf9cgbZbpAEb1qcntE,2964
|
4
|
+
grpc_observability/_observability.py,sha256=9CQoRPDql9dQJjs4GL7q9Lm6vz0jPIVQpDawp34M8G0,4587
|
5
|
+
grpc_observability/_observability_config.py,sha256=iJK76Xc9zUS2p7yE_wFg37HsMvajgw77Y4O7sn0IPsU,4289
|
6
|
+
grpc_observability/_open_census_exporter.py,sha256=ScrI99JauEREZ7t8Zx-9dwvwQo-S3PSA8jm0J7lPZyU,11817
|
7
|
+
grpc_observability/_open_telemetry_measures.py,sha256=YUcYM8j-KSK6iJZIaQSd1GXCIgs-S-XhIZ-BSwNA96Y,2949
|
8
|
+
grpc_observability/_open_telemetry_observability.py,sha256=5Zjm52LoQobzn9DKAwe6HeRN8L3ZZN_kGQEdPr3TacA,20434
|
9
|
+
grpc_observability/_open_telemetry_plugin.py,sha256=Oq6clNm3lnTCJx8oXdBaw-UhHZ-R3Y6Vvt24IBQR3iA,6423
|
10
|
+
grpc_observability/_views.py,sha256=00qGphmTIVv9NC8cTqqXa8EuqeZwUy6MdaAJ0TAZaUQ,9559
|
11
|
+
grpcio_observability-1.74.0rc1.dist-info/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
|
12
|
+
grpcio_observability-1.74.0rc1.dist-info/METADATA,sha256=avPmpoLgS5N4zPByijJWGd7zHL0vrJlMHj1pZTRqfLg,3921
|
13
|
+
grpcio_observability-1.74.0rc1.dist-info/WHEEL,sha256=I-r1WauELLrnPgiwsCTALB27TLw2rlJgS84K8unpTd4,105
|
14
|
+
grpcio_observability-1.74.0rc1.dist-info/top_level.txt,sha256=Sfv2I7Rx3dpHi0iFX1iKlQ9o_zcOcaKvSiXWmwLmc3w,19
|
15
|
+
grpcio_observability-1.74.0rc1.dist-info/RECORD,,
|
@@ -1,15 +0,0 @@
|
|
1
|
-
grpc_observability/__init__.py,sha256=H8-SPp2DazGSUWyGYhzdwoRC9IPtkN1oPwwzttWFTlg,688
|
2
|
-
grpc_observability/_cyobservability.cpython-310-arm-linux-gnueabihf.so,sha256=Xg1NBG2WwauvY_dVUBOGLP6IHtxHT9cKHv-nEELBjE8,570792
|
3
|
-
grpc_observability/_measures.py,sha256=uzCLBz677MYV4UmR3gOQ0443iEf9cgbZbpAEb1qcntE,2964
|
4
|
-
grpc_observability/_observability.py,sha256=Ja-xCDL9HzQlNlQsauFaPQR-uIPcKmiQSnsKiA3bjkk,4472
|
5
|
-
grpc_observability/_observability_config.py,sha256=KFRMNpBE0-2ju8LP6Vyv3wlvLC5X2OBcPOtotSLeF24,4264
|
6
|
-
grpc_observability/_open_census_exporter.py,sha256=_0xmgGA_TLe8SY0cEPcOp0DP8N0Gkue-L0TallZeurA,11800
|
7
|
-
grpc_observability/_open_telemetry_measures.py,sha256=YUcYM8j-KSK6iJZIaQSd1GXCIgs-S-XhIZ-BSwNA96Y,2949
|
8
|
-
grpc_observability/_open_telemetry_observability.py,sha256=gEu1i0g4EyEdhOd_J7rdz2mzI6eFtxYDg1uuVgAVx3E,20443
|
9
|
-
grpc_observability/_open_telemetry_plugin.py,sha256=Oq6clNm3lnTCJx8oXdBaw-UhHZ-R3Y6Vvt24IBQR3iA,6423
|
10
|
-
grpc_observability/_views.py,sha256=mZVNSVmP-fyBDRAIjJPjKdot_Zt2uD4rZCsdhX_DwhE,9555
|
11
|
-
grpcio_observability-1.73.1.dist-info/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
|
12
|
-
grpcio_observability-1.73.1.dist-info/METADATA,sha256=PGEElzc_9Ux6kgv2R_IzhOUPZG1eDCNkh2mYkEsMK0s,3915
|
13
|
-
grpcio_observability-1.73.1.dist-info/WHEEL,sha256=I-r1WauELLrnPgiwsCTALB27TLw2rlJgS84K8unpTd4,105
|
14
|
-
grpcio_observability-1.73.1.dist-info/top_level.txt,sha256=Sfv2I7Rx3dpHi0iFX1iKlQ9o_zcOcaKvSiXWmwLmc3w,19
|
15
|
-
grpcio_observability-1.73.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{grpcio_observability-1.73.1.dist-info → grpcio_observability-1.74.0rc1.dist-info}/top_level.txt
RENAMED
File without changes
|