flea1lt commented on code in PR #11247:
URL: https://github.com/apache/apisix/pull/11247#discussion_r1616502108


##########
docs/en/latest/plugins/opentelemetry.md:
##########
@@ -53,18 +53,26 @@ You can set up the collector by configuring it in you 
configuration file (`conf/
 
 | Name                                       | Type    | Default               
                            | Description                                       
                                                                                
                                                                                
            |
 
|--------------------------------------------|---------|---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| trace_id_source                            | enum    | random                
                            | Source of the trace ID. Valid values are `random` 
or `x-request-id`. When set to `x-request-id`, the value of the `x-request-id` 
header will be used as trace ID. Make sure that is matches the regex pattern 
`[0-9a-f]{32}`. |
+| trace_id_source                            | enum    | x-request-id          
                            | Source of the trace ID. Valid values are `random` 
or `x-request-id`. When set to `x-request-id`, the value of the `x-request-id` 
header will be used as trace ID. Make sure that it matches the regex pattern 
`[0-9a-f]{32}`. |
 | resource                                   | object  |                       
                            | Additional 
[resource](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md)
 appended to the trace.                                                         
                  |
 | collector                                  | object  | {address = 
"127.0.0.1:4318", request_timeout = 3} | OpenTelemetry Collector configuration. 
                                                                                
                                                                                
                       |
 | collector.address                          | string  | 127.0.0.1:4318        
                            | Collector address. If the collector serves on 
https, use https://127.0.0.1:4318 as the address.                               
                                                                                
                     |
 | collector.request_timeout                  | integer | 3                     
                            | Report request timeout in seconds.                
                                                                                
                                                                                
            |
 | collector.request_headers                  | object  |                       
                            | Report request HTTP headers.                      
                                                                                
                                                                                
            |
 | batch_span_processor                       | object  |                       
                            | Trace span processor.                             
                                                                                
                                                                                
            |
-| batch_span_processor.drop_on_queue_full    | boolean | true                  
                            | When set to `true`, drops the span when queue is 
full. Otherwise, force process batches.                                         
                                                                                
             |
-| batch_span_processor.max_queue_size        | integer | 2048                  
                            | Maximum queue size for buffering spans for 
delayed processing.                                                             
                                                                                
                   |
-| batch_span_processor.batch_timeout         | number  | 5                     
                            | Maximum time in seconds for constructing a batch. 
                                                                                
                                                                                
            |
-| batch_span_processor.max_export_batch_size | integer | 256                   
                            | Maximum number of spans to process in a single 
batch.                                                                          
                                                                                
               |
-| batch_span_processor.inactive_timeout      | number  | 2                     
                            | Time interval in seconds between processing 
batches.                                                                        
                                                                                
                  |
+| batch_span_processor.drop_on_queue_full    | boolean | false                 
                            | When set to `true`, drops the span when queue is 
full. Otherwise, force process batches.                                         
                                                                                
             |
+| batch_span_processor.max_queue_size        | integer | 1024                  
                            | Maximum queue size for buffering spans for 
delayed processing.                                                             
                                                                                
                   |
+| batch_span_processor.batch_timeout         | number  | 2                     
                            | Maximum time in seconds for constructing a batch. 
                                                                                
                                                                                
            |
+| batch_span_processor.max_export_batch_size | integer | 16                    
                            | Maximum number of spans to process in a single 
batch.                                                                          
                                                                                
               |
+| batch_span_processor.inactive_timeout      | number  | 1                     
                            | Time interval in seconds between processing 
batches.                                                                        
                                                                                
                  |
+
+:::note
+
+When the `trace_id_source` is set to `x-request-id` and requests carry an 
`x-request-id` header generated by Envoy, there may be issues pushing traces to 
the collector.

Review Comment:
   In this situation, users will encounter a "bad argument # 1 to '?' (invalid 
value)" error triggered by `hex2bytes` function.
   
   I will add this error message at this node.



-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to