Skip to content

Commit 02cc0c6

Browse files
committed
fstring
1 parent bf98c6d commit 02cc0c6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

exporter/opentelemetry-exporter-otlp-proto-grpc/tests/logs/test_otlp_logs_exporter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ def test_otlp_exporter_endpoint(self, mock_secure, mock_insecure):
207207
mock_insecure,
208208
),
209209
]
210+
# pylint: disable=C0209
210211
for endpoint, insecure, mock_method in endpoints:
211212
OTLPLogExporter(endpoint=endpoint, insecure=insecure)
212213
self.assertEqual(

opentelemetry-sdk/src/opentelemetry/sdk/logs/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def to_json(self) -> str:
8787
"severity_text": self.severity_text,
8888
"attributes": self.attributes,
8989
"timestamp": ns_to_iso_str(self.timestamp),
90-
"trace_id": "0x{}".format(format_trace_id(self.trace_id)),
91-
"span_id": "0x{}".format(format_span_id(self.span_id)),
90+
"trace_id": f"0x{format_trace_id(self.trace_id)}",
91+
"span_id": f"0x{format_span_id(self.span_id)}",
9292
"trace_flags": self.trace_flags,
9393
"resource": repr(self.resource.attributes)
9494
if self.resource

0 commit comments

Comments
 (0)