grafana / grafana/pyroscope-java
Can we change the configuration like sampling duration at runtime without restarting the app?
- Lingua principale
- Java
- Stelle
- 126
- Fork
- 48
- Merge medio
- 4g 14h
- PR unite (30g)
- 5
Descrizione
Currently, we can provide the sampling duration at the time of building configuration and then we provide that configuration to PyroscopeAgent.start(config) method.
But i didn't find any method/api so that i can change the sampling duration/sampling rate after starting the agent without restarting the app.
Please let me know if we can achieve this behavior already and i have missed it or it is not possible for now with current code.
Thanks.
```
PyroscopeAgent.start(
new Config.Builder()
.setApplicationName("app-java")
.setProfilingEvent(EventType.ITIMER)
.setFormat(Format.JFR)
//pyroscope is service name
// pyroscope-test is namespace in which pyroscope service is running and listening for profiling data
.setServerAddress("http://pyroscope.pyroscope-test.cluster.local:4040")
// Optionally, if authentication is enabled, specify the API key.
// .setAuthToken(System.getenv("PYROSCOPE_AUTH_TOKEN"))
// Optionally, if you'd like to sets allocation threshold to register events, in bytes. '0' registers all events
// .setProfilingAlloc("0")
.setSamplingDuration(Duration.ofSeconds(1))
.build()
);
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia esaminando Config.Builder e PyroscopeAgent.start, in particolare il modo in cui la durata del campionamento e le impostazioni di profiling vengono memorizzate e applicate. Determina se l’agent può esporre aggiornamenti a runtime senza riavviarsi. Il lavoro è completato quando la durata del campionamento o la frequenza di campionamento possono essere modificate dopo l’avvio senza riavviare l’applicazione, e questo comportamento è coperto dai test pertinenti.
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