Skip to content

Commit 3dfa329

Browse files
committed
apply black formatting
1 parent ab18595 commit 3dfa329

File tree

1 file changed

+4
-2
lines changed
  • exporters/aws-otel-otlp-udp-exporter/validation-app

1 file changed

+4
-2
lines changed

exporters/aws-otel-otlp-udp-exporter/validation-app/app.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
from opentelemetry.sdk.trace.export import BatchSpanProcessor
77
from amazon.opentelemetry.exporters.otlp.udp import OTLPUdpSpanExporter
88

9+
910
# Set up a UDP server to verify data is sent
1011
def udp_server():
1112
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
12-
sock.bind(('127.0.0.1', 2000))
13+
sock.bind(("127.0.0.1", 2000))
1314
sock.settimeout(5)
1415
print("UDP server listening on 127.0.0.1:2000")
1516
try:
@@ -24,6 +25,7 @@ def udp_server():
2425
finally:
2526
sock.close()
2627

28+
2729
# Start UDP server in a separate thread
2830
server_thread = threading.Thread(target=udp_server)
2931
server_thread.daemon = True
@@ -44,7 +46,7 @@ def udp_server():
4446
parent.set_attribute("service.name", "validation-app")
4547
parent.set_attribute("test.attribute", "test_value")
4648
parent.add_event("test-event", {"event.data": "some data"})
47-
49+
4850
# Add a child span
4951
with tracer.start_as_current_span("test_child_span") as child:
5052
child.set_attribute("child.attribute", "child_value")

0 commit comments

Comments
 (0)