grpcio-csm-observability 1.75.1__py3-none-any.whl → 1.76.0rc1__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.
@@ -143,8 +143,7 @@ class CSMOpenTelemetryLabelInjector(OpenTelemetryLabelInjector):
143
143
  ) -> Dict[str, str]:
144
144
  if include_exchange_labels:
145
145
  return self._additional_exchange_labels
146
- else:
147
- return {}
146
+ return {}
148
147
 
149
148
  @staticmethod
150
149
  def deserialize_labels(labels: Dict[str, AnyStr]) -> Dict[str, AnyStr]:
@@ -182,7 +181,7 @@ class CSMOpenTelemetryLabelInjector(OpenTelemetryLabelInjector):
182
181
  # If CSM label injector is enabled on server side but client didn't send
183
182
  # XEnvoyPeerMetadata, we'll record remote label as unknown.
184
183
  else:
185
- for _, remote_key in METADATA_EXCHANGE_KEY_FIXED_MAP.items():
184
+ for remote_key in METADATA_EXCHANGE_KEY_FIXED_MAP.values():
186
185
  deserialized_labels[remote_key] = UNKNOWN_VALUE
187
186
  deserialized_labels[key] = value
188
187
 
@@ -217,9 +216,8 @@ class CsmOpenTelemetryPluginOption(OpenTelemetryPluginOption):
217
216
  match = re.search(authority_pattern, target)
218
217
  if match:
219
218
  return TRAFFIC_DIRECTOR_AUTHORITY in match.group(1)
220
- else:
221
- # Return True if the authority doesn't exist
222
- return True
219
+ # Return True if the authority doesn't exist
220
+ return True
223
221
 
224
222
  @staticmethod
225
223
  def is_active_on_server(
@@ -299,7 +297,6 @@ def get_resource_type(gcp_resource: Resource) -> str:
299
297
  )
300
298
  if gcp_resource_type == "gke_container":
301
299
  return TYPE_GKE
302
- elif gcp_resource_type == "gce_instance":
300
+ if gcp_resource_type == "gce_instance":
303
301
  return TYPE_GCE
304
- else:
305
- return gcp_resource_type
302
+ return gcp_resource_type
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: grpcio-csm-observability
3
- Version: 1.75.1
3
+ Version: 1.76.0rc1
4
4
  Summary: gRPC Python CSM observability package
5
5
  Home-page: https://grpc.io
6
6
  Author: The gRPC Authors
@@ -16,7 +16,7 @@ Requires-Python: >=3.9
16
16
  License-File: LICENSE
17
17
  Requires-Dist: opentelemetry-sdk >=1.25.0
18
18
  Requires-Dist: opentelemetry-resourcedetector-gcp >=1.6.0a0
19
- Requires-Dist: grpcio ==1.75.1
19
+ Requires-Dist: grpcio ==1.76.0rc1
20
20
  Requires-Dist: protobuf <7.0.0,>=6.31.1
21
21
 
22
22
  gRPC Python CSM Observability
@@ -0,0 +1,7 @@
1
+ grpc_csm_observability/__init__.py,sha256=CRuqnwMQmI9pSQdnTnI32xReU-7PLlB45hbgXWycEXw,709
2
+ grpc_csm_observability/_csm_observability_plugin.py,sha256=opa-hlTPOGdkpH98qISfIEDHeaVhlK_mgOumjZ16oS8,11499
3
+ grpcio_csm_observability-1.76.0rc1.dist-info/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
4
+ grpcio_csm_observability-1.76.0rc1.dist-info/METADATA,sha256=wh2V5uk4RzaHrKWGqlD6u0zdfdSr-jP-hO_SMN5Mc2E,3293
5
+ grpcio_csm_observability-1.76.0rc1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
+ grpcio_csm_observability-1.76.0rc1.dist-info/top_level.txt,sha256=FSgLI8hb_KL25S49JgyLTjHgdxM3PpcrkWQrbOQiaB8,23
7
+ grpcio_csm_observability-1.76.0rc1.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- grpc_csm_observability/__init__.py,sha256=CRuqnwMQmI9pSQdnTnI32xReU-7PLlB45hbgXWycEXw,709
2
- grpc_csm_observability/_csm_observability_plugin.py,sha256=eukEHiLjbyvPqxlc6sBnmuVpYcnk5h-cE6t2PT6BCcA,11557
3
- grpcio_csm_observability-1.75.1.dist-info/LICENSE,sha256=WQGY4_MF8sNH_eZNY3xlSSu-9VTbbINk4UnNN143l-4,29687
4
- grpcio_csm_observability-1.75.1.dist-info/METADATA,sha256=z-KSiUuyo1nrVKLf0QFSA6_uocAq_W9yCZ4AUywPVaw,3287
5
- grpcio_csm_observability-1.75.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
- grpcio_csm_observability-1.75.1.dist-info/top_level.txt,sha256=FSgLI8hb_KL25S49JgyLTjHgdxM3PpcrkWQrbOQiaB8,23
7
- grpcio_csm_observability-1.75.1.dist-info/RECORD,,