elastic / elastic/apm-agent-java

Measure GC overhead

Aperta
#1,791 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
agent-java new-feature
Lingua principale
Java
Stelle
594
Fork
338
Merge medio
1g 13h
PR unite (30g)
25

Descrizione

## Is your feature request related to a problem?

Sometimes our processes are struggling with GC, but it's not easy to "spot" or alert on if it's not at the point of OOMing, but it's just so busy doing GC it's effectively not getting it's work done. We'd like to be aware of instances that are in this state, and possibly alert on it.

## Describe the solution you'd like

It'd be nice if the APM agent could record an approximation of how much time it has spent on GC.

Elasticsearch has a similar solution
https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/monitor/jvm/JvmGcMonitorService.java
It's doing it as a scheduled task. I think it's also possible using https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html

What we want it something we can eventually alert on, e.g. if overhead > 50%, your application isn't getting much real work done.

## Describe alternatives you've considered

It's possible to collect it via custom metrics e.g. micrometer, but we have some services where we don't want to add custom code to.

## Additional context

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia esaminando il Elasticsearch JvmGcMonitorService indicato e l’API GarbageCollectionNotificationInfo di Java per confrontare gli approcci basati su attività pianificate e su notifiche. Traccia il modo in cui questo agente APM registra le metriche, quindi definisci l’approssimazione del tempo di GC e verifica che possa supportare gli avvisi quando l’overhead del GC supera una soglia.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
observability
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.