Skip to content

Commit 16836e8

Browse files
committed
Fix formatting
1 parent eb9fe9c commit 16836e8

File tree

1 file changed

+3
-7
lines changed
  • opentelemetry-exporter-gcp-logging/src/opentelemetry/exporter/cloud_logging

1 file changed

+3
-7
lines changed

opentelemetry-exporter-gcp-logging/src/opentelemetry/exporter/cloud_logging/__init__.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _convert_any_value_to_string(value: Any) -> str:
124124
return json.dumps(value, separators=(",", ":"), cls=_GenAiJsonEncoder)
125125
try:
126126
return str(value)
127-
except Exception as exc: # pylint: disable=broad-except
127+
except Exception as exc: # pylint: disable=broad-except
128128
logging.exception(
129129
"Error mapping AnyValue to string, this field will not be added to the LogEntry: %s",
130130
exc,
@@ -190,9 +190,7 @@ def _set_payload_in_log_entry(log_entry: LogEntry, body: AnyValue):
190190
else:
191191
log_entry.text_payload = base64.b64encode(body).decode()
192192
elif body is not None:
193-
log_entry.text_payload = _convert_any_value_to_string(
194-
body
195-
)
193+
log_entry.text_payload = _convert_any_value_to_string(body)
196194

197195

198196
def is_log_id_valid(log_id: str) -> bool:
@@ -280,9 +278,7 @@ def export(self, batch: Sequence[LogData]):
280278
log_record.severity_number.value # type: ignore[index]
281279
]
282280
log_entry.labels = {
283-
k: _convert_any_value_to_string(
284-
v
285-
)
281+
k: _convert_any_value_to_string(v)
286282
for k, v in attributes.items()
287283
}
288284
if log_record.event_name:

0 commit comments

Comments
 (0)