diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/tests/perfstress_tests/trace_exporter.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/tests/perfstress_tests/trace_exporter.py index e22ec6588369..d5268a5fd843 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/tests/perfstress_tests/trace_exporter.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/tests/perfstress_tests/trace_exporter.py @@ -39,8 +39,9 @@ def run_sync(self): Avoid putting any ancilliary logic (e.g. generating UUIDs), and put this in the setup/init instead so that we're only measuring the client API call. """ - with tracer.start_as_current_span("hello"): - print("Hello, World!") + for _ in range(self.args.num_traces): + with tracer.start_as_current_span("hello"): + print("Hello, World!") @staticmethod def add_arguments(parser):