Splunk Dev

HEC Appender logging slow

kombi
Loves-to-Learn Lots

Logging a single line to Splunk is taking about 30ms with the HEC appender. 

e.g, the result of the below is 30ms.

Long start1 = System.currentTimeMillis(); 
log.info("Test logging"); 
Long start2 = System.currentTimeMillis(); 
log.info("logTime={}", start2 - start1);

 

This is our logback config - 

kombi_0-1715999515555.png

Taking 30 ms is too long for a single log action. Are we missing anything in the config ?

 

Labels (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

What do you mean by "takes 30ms"? Measured how - from when till when?

Did you do a tcpdump to check packets timeline?

Did you test just a single event or pushed in batch?

0 Karma

kombi
Loves-to-Learn Lots

Hi,

We re measuring with a code snippet like the below, the time before we called the logger subtract the time the logger completed.

Long start1 = System.currentTimeMillis(); 
log.info("Test logging"); 
Long start2 = System.currentTimeMillis(); 
log.info("logTime={}", start2 - start1);

We have not use a tcpdump yet as this is running on a container, not able to use batch too since we needed type=raw which don't support batch configs from my understanding. Is there a way to work with Raw type and send as batch?

Thanks.

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...