grafana / grafana/pyroscope-java
Can we change the configuration like sampling duration at runtime without restarting the app?
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 125
- Forks
- 48
- Ø Merge
- 4 T. 14 Std.
- Gemergte PRs (30 T.)
- 5
Beschreibung
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()
);
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Überprüfung von Config.Builder und PyroscopeAgent.start, insbesondere dahingehend, wie Sampling-Dauer und Profiling-Einstellungen gespeichert und angewendet werden. Ermittle, ob der Agent Laufzeitaktualisierungen ohne Neustart bereitstellen kann. Als erledigt gilt die Aufgabe, wenn die Sampling-Dauer oder Sampling-Rate nach dem Start geändert werden kann, ohne die Anwendung neu zu starten, und dieses Verhalten durch die relevanten Tests abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- observability
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100