jscheffl commented on code in PR #51792:
URL: https://github.com/apache/airflow/pull/51792#discussion_r2690314738


##########
chart/values.yaml:
##########
@@ -2414,6 +2414,37 @@ statsd:
   # Arguments for StatsD exporter command.
   args: ["--statsd.mapping-config=/etc/statsd-exporter/mappings.yml"]
 
+  # If you ever need to fully override the entire args list, you can
+  # supply your own array here; if set, all below flag-specific values
+  # (mappingConfig, cache-size, cache-type, ttl) are ignored.
+  # args:
+  #  - "--statsd.cache-size=1000"
+  #  - "--statsd.cache-type=random"
+  #  - "--ttl=10m"
+  # -------------------------------------------------------------------
+
+  # Path in the container to the mapping config file.
+
+  cache:
+    # Maximum number of metric‐mapping entries to keep in cache.
+    # When you send more distinct metric names than this, older entries
+    # will be evicted according to cacheType.
+    # Default: 1000
+    size: 1000
+
+    # Metrics Eviction policy for the mapping cache.
+    #   - lru    → Least‐Recently‐Used eviction
+    #   - random → Random eviction
+    # Default: lru
+    type: lru
+
+    # Per‐metric time‐to‐live. When set to a non‐zero duration, any metric
+    # series that hasn't received an update in this interval will be dropped
+    # from the exported /metrics output.
+    # Format: Go duration string (e.g. "30s", "5m", "1h")
+    # Default: "0s" (disabled, never expires)
+    ttl: "0s"

Review Comment:
   I tried to apply this parameter but then statsd fails to start with:
   `statsd_exporter: error: unknown long flag '--ttl', try --help`
   
   `--help` gives me:
   ```
   usage: statsd_exporter [<flags>]                                             
                                                                                
                                                                               
                                                                                
                                                                                
                                                                               
                                                                                
                                                                                
                                                                               
   Flags:                                                                       
                                                                                
                                                                               
     -h, --[no-]help               Show context-sensitive help (also try        
                                                                                
                                                                               
                                   --help-long and --help-man).                 
                                                                                
                                                                               
         --web.listen-address=":9102"                                           
                                                                                
                                                                               
                                   The address on which to expose the web 
interface                                                                       
                                                                                
     
                                   and generated Prometheus metrics.            
                                                                                
                                                                               
         --[no-]web.enable-lifecycle                                            
                                                                                
                                                                               
                                   Enable shutdown and reload via HTTP request. 
                                                                                
                                                                               
         --web.telemetry-path="/metrics"                                        
                                                                                
                                                                               
                                   Path under which to expose metrics.          
                                                                                
                                                                               
         --statsd.listen-udp=":9125"                                            
                                                                                
                                                                               
                                   The UDP address on which to receive statsd   
                                                                                
                                                                               
                                   metric lines. "" disables it.                
                                                                                
                                                                               
         --statsd.listen-tcp=":9125"                                            
                                                                                
                                                                               
                                   The TCP address on which to receive statsd   
                                                                                
                                                                               
                                   metric lines. "" disables it.                
                                                                                
                                                                               
         --statsd.listen-unixgram=""                                            
                                                                                
                                                                               
                                   The Unixgram socket path to receive statsd   
                                                                                
                                                                               
                                   metric lines in datagram. "" disables it.    
                                                                                
                                                                               
         --statsd.unixsocket-mode="755"                                         
                                                                                
                                                                               
                                   The permission mode of the unix socket.      
                                                                                
                                                                               
         --statsd.mapping-config=STATSD.MAPPING-CONFIG                          
                                                                                
                                                                               
                                   Metric mapping configuration file name.      
                                                                                
                                                                               
         --statsd.read-buffer=STATSD.READ-BUFFER                                
                                                                                
                                                                               
                                   Size (in bytes) of the operating system's    
                                                                                
                                                                               
                                   transmit read buffer associated with the UDP 
or                                                                              
                                                                               
                                   Unixgram connection. Please make sure the 
kernel                                                                          
                                                                                
  
                                   parameters net.core.rmem_max is set to a 
value                                                                           
                                                                                
   
                                   greater than the value specified.            
                                                                                
                                                                               
         --statsd.cache-size=1000  Maximum size of your metric mapping cache.   
                                                                                
                                                                               
                                   Relies on least recently used replacement 
policy                                                                          
                                                                                
  
                                   if max size is reached.                      
                                                                                
                                                                               
         --statsd.cache-type=lru   Metric mapping cache type. Valid options are 
                                                                                
                                                                               
                                   "lru" and "random"                           
                                                                                
                                                                               
         --statsd.event-queue-size=10000                                        
                                                                                
                                                                               
                                   Size of internal queue for processing 
events.                                                                         
                                                                                
      
         --statsd.event-flush-threshold=1000                                    
                                                                                
                                                                               
                                   Number of events to hold in queue before     
                                                                                
                                                                               
                                   flushing.                                    
                                                                                
                                                                               
         --statsd.event-flush-interval=200ms                                    
                                                                                
                                                                               
                                   Maximum time between event queue flushes.    
                                                                                
                                                                               
         --debug.dump-fsm=""       The path to dump internal FSM generated for 
glob                                                                            
                                                                                
                                   matching as Dot file.                        
                                                                                
                                                                               
         --[no-]check-config       Check configuration and exit.                
                                                                                
                                                                               
         --[no-]statsd.parse-dogstatsd-tags                                     
                                                                                
                                                                               
                                   Parse DogStatsd style tags. Enabled by 
default.                                                                        
                                                                                
     
         --[no-]statsd.parse-influxdb-tags                                      
                                                                                
                                                                               
                                   Parse InfluxDB style tags. Enabled by 
default.                                                                        
                                                                                
      
         --[no-]statsd.parse-librato-tags                                       
                                                                                
                                                                               
                                   Parse Librato style tags. Enabled by 
default.                                                                        
                                                                                
       
         --[no-]statsd.parse-signalfx-tags                                      
                                                                                
                                                                               
                                   Parse SignalFX style tags. Enabled by 
default.                                                                        
                                                                                
      
         --statsd.relay.address=STATSD.RELAY.ADDRESS                            
                                                                                
                                                                               
                                   The UDP relay target address (host:port)     
                                                                                
                                                                               
         --statsd.relay.packet-length=1400                                      
                                                                                
                                                                               
                                   Maximum relay output packet length to avoid  
                                                                                
                                                                               
                                   fragmentation                                
                                                                                
                                                                               
         --statsd.udp-packet-queue-size=10000                                   
                                                                                
                                                                               
                                   Size of internal queue for processing UDP    
                                                                                
                                                                               
                                   packets.                                     
                                                                                
                                                                               
         --log.level=info          Only log messages with the given severity or 
                                                                                
                                                                               
                                   above. One of: [debug, info, warn, error]    
                                                                                
                                                                               
         --log.format=logfmt       Output format of log messages. One of: 
[logfmt,                                                                        
                                                                                
     
                                   json]                                        
                                                                                
                                                                               
         --[no-]version            Show application version.    
   ```
   
   I tested with statsd_expoerter v0.28.0 - is this only available of a fork or 
a manually built image?



-- 
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