elastic / elastic/apm-agent-java

STARTUP TUNING: Provide simplified logging option to avoid logging framework initialization overhead

Open
#2,457 0 comments 0 reactions 0 assignees View on GitHub
agent-java
Dominant language
Java
Stars
594
Forks
338
Avg merge
1d 13h
Merged PRs (30d)
25

Description

## Is your feature request related to a problem?
The logging framework initialization is the largest single component of agent startup time, taking (at time of issue creation) 15%-25% of the startup time depending on how many instrumentations are applied (fewer instrumentations applied means a faster overall startup but the logging initialization is constant so takes a larger percentage, ie with all instrumentations disabled, the logging framework initialization takes 25% of startup time!)

## Describe the solution you'd like
One option (possibly the best) is to replace the logging framework completely. However this may require extensive work. A simpler option is to provide a simplified logging setup that can be selected, which avoids the logging framework initialization, eg a no-op or a simple print to a defined log file or stdout

## Describe alternatives you've considered
I've run with logging framework initialization disabled by hacking in the no-op logger as a hardcoded option (for testing), but this loses all log lines so is not ideal

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.