mirror of
https://github.com/mii443/prometheus-android-exporter.git
synced 2025-12-03 02:58:29 +00:00
remote unneceserry logs
This commit is contained in:
@@ -52,27 +52,17 @@ class PromWorker(
|
||||
var deferred = coroutineScope {
|
||||
if(config.prometheusServerEnabled){
|
||||
launch{
|
||||
Log.v(TAG, "1")
|
||||
PrometheusServer.start(
|
||||
PrometheusServerConfig(config.prometheusServerPort, ::performScrape),
|
||||
)
|
||||
Log.v(TAG, "7")
|
||||
Log.v(TAG, "Prometheus server started.")
|
||||
}
|
||||
launch {
|
||||
// while(true){
|
||||
// Log.v(TAG, "aaaaaaaaa")
|
||||
// delay(500)
|
||||
// }
|
||||
}
|
||||
Log.v(TAG, "Prometheus server started.")
|
||||
}
|
||||
|
||||
if(config.pushproxEnabled){
|
||||
launch {
|
||||
|
||||
}
|
||||
|
||||
Log.v(TAG, "Pushprox client started.")
|
||||
}
|
||||
|
||||
if(config.remoteWriteEnabled){
|
||||
|
||||
@@ -16,6 +16,7 @@ import kotlinx.coroutines.NonCancellable
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import kotlinx.coroutines.yield
|
||||
|
||||
private const val TAG = "PROMETHEUS_SERVER"
|
||||
|
||||
@@ -30,14 +31,13 @@ data class PrometheusServerConfig(
|
||||
class PrometheusServer() {
|
||||
companion object {
|
||||
suspend fun start(config: PrometheusServerConfig) {
|
||||
val server = configureServer(config)
|
||||
try{
|
||||
Log.v(TAG, "Starting prometheus server")
|
||||
Log.v(TAG, "Starting prometheus server")
|
||||
|
||||
Log.v(TAG, "2")
|
||||
val server = configureServer(config)
|
||||
|
||||
try{
|
||||
server.start()
|
||||
Log.v(TAG, "5")
|
||||
delay(10000000L)
|
||||
delay(Long.MAX_VALUE)
|
||||
}finally {
|
||||
withContext(NonCancellable){
|
||||
Log.v(TAG, "3")
|
||||
@@ -45,7 +45,6 @@ class PrometheusServer() {
|
||||
Log.v(TAG, "4")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun getLandingPage(): String {
|
||||
|
||||
Reference in New Issue
Block a user