This is an automated email from the ASF dual-hosted git repository.

abhishekrb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 7161f0a60a6 Use LinkedHashMap for EventMap to preserve ordering of 
Event dimensions (#18993)
7161f0a60a6 is described below

commit 7161f0a60a6db25d611d74ff8436815b51d1e293
Author: Abhishek Radhakrishnan <[email protected]>
AuthorDate: Mon Feb 9 11:55:56 2026 -0800

    Use LinkedHashMap for EventMap to preserve ordering of Event dimensions 
(#18993)
    
    * Use a LinkedHashMap for EventMap so order of insertion is preserved.
    
    Currently, when we use LoggingEmitter and/or LoggingRequestLogger, long, 
complex SQL queries make up the majority of the log volume,
    so we truncate logs to some extent. With metric events, this often times 
lead to the "value" part among other getting truncated.
    So this patch switches the EventMap to a LinkedHashMap so critical info 
(e.g., metric name and value) are logged first,
    followed by fields like service dimensions, user dimensions and the SQL 
query itself.
    
    Same idea for the request logger: we log the query context before the SQL 
query itself, which lets us preserve any useful/debuggable
    information deterministically even under truncation.
    
    Given these maps typically have at most ~20–30 key/value pairs, the 
additional overhead of using a LinkedHashMap should be okay.
    
    * Checkstyle
    
    * RequestLogger test
    
    * Review comments
    
    * Forbidden API
    
    * Cleanup


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to