Revolyssup commented on PR #12686:
URL: https://github.com/apache/apisix/pull/12686#issuecomment-3449799354

   # Benchmark
   
   1. Add route
   
   ```jsx
    apisix git:(nic/opentelemetry) ✗ curl 
"<http://127.0.0.1:9180/apisix/admin/routes>" -X PUT \\
     -H "X-API-KEY: ${admin_key}" \\
     -d '{
       "id": "otel-tracing-route",
       "uri": "/headers",
       "plugins": {
         "opentelemetry": {
           "sampler": {
             "name": "always_on"
           }
         }
       },
       "upstream": {
         "type": "roundrobin",
         "nodes": {
           "127.0.0.1:8080": 1
         }
       }
     }'
   
   ```
   
   ## Without instrumentation
   
   - Run wrk
   
   ```jsx
    wrk -t4 -c100 -d30s http://localhost:9080/headers
   
   Running 30s test @ http://localhost:9080/headers
     4 threads and 100 connections
     Thread Stats   Avg      Stdev     Max   +/- Stdev
       Latency     8.26ms    9.89ms 224.12ms   93.95%
       Req/Sec     3.63k   793.25     6.19k    74.06%
     434324 requests in 30.09s, 142.90MB read
   Requests/sec:  14432.04
   Transfer/sec:      4.75MB
   ```
   
   ## With instrumentation
   
   - Run wrk
   
   ```jsx
   apisix git:(nic/opentelemetry) ✗ wrk -t4 -c100 -d30s 
http://localhost:9080/headers
   
   Running 30s test @ http://localhost:9080/headers
     4 threads and 100 connections
     Thread Stats   Avg      Stdev     Max   +/- Stdev
       Latency    25.08ms   23.26ms 375.33ms   88.01%
       Req/Sec     1.16k   334.41     2.13k    67.03%
     138659 requests in 30.08s, 45.62MB read
   Requests/sec:   4609.57
   Transfer/sec:      1.52MB
   ```
   
   - Check traces
   
   
![screenshot-2025-10-27_12-29-30.png](attachment:3abee5d7-6847-4abb-8400-50d65fd9b22a:screenshot-2025-10-27_12-29-30.png)
   
   📊 Summary:
   After adding OpenTelemetry instrumentation, the request throughput dropped 
by about 68%, and average latency increased roughly threefold.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to