Skip to content

Commit

Permalink
Merge pull request #657 from johnoliver/fix-otel
Browse files Browse the repository at this point in the history
Remove Application Insights from updater pending otel fix
  • Loading branch information
johnoliver authored Aug 31, 2023
2 parents 0f01da1 + 6fee57b commit b7ae8f0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
8 changes: 0 additions & 8 deletions adoptium-updater-parent/adoptium-api-v3-updater/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
</dependency>
<dependency>
<groupId>net.adoptium.api</groupId>
<artifactId>adoptium-api-v3-telemetry</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package net.adoptium.api.v3

import net.adoptium.api.v3.ai.AppInsightsTelemetry
import org.jboss.weld.environment.se.Weld

class Main {
companion object {
@JvmStatic
fun main(args: Array<String>) {
// Force eager App insights loading
AppInsightsTelemetry.enabled
// AppInsightsTelemetry.enabled

val container = Weld().containerId("STATIC_INSTANCE").initialize()
val v3Updater = container.select(V3Updater::class.java).get()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ package net.adoptium.api.v3

import io.quarkus.arc.profile.UnlessBuildProfile
import io.quarkus.runtime.Startup
import jakarta.enterprise.context.ApplicationScoped
import jakarta.inject.Inject
import jakarta.ws.rs.ApplicationPath
import jakarta.ws.rs.core.Application
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import net.adoptium.api.v3.ai.AppInsightsTelemetry
import net.adoptium.api.v3.config.APIConfig
import net.adoptium.api.v3.dataSources.APIDataStore
import net.adoptium.api.v3.dataSources.ReleaseVersionResolver
Expand All @@ -23,10 +26,6 @@ import java.util.*
import java.util.concurrent.ConcurrentSkipListSet
import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit
import jakarta.enterprise.context.ApplicationScoped
import jakarta.inject.Inject
import jakarta.ws.rs.ApplicationPath
import jakarta.ws.rs.core.Application
import kotlin.concurrent.timerTask

@UnlessBuildProfile("test")
Expand Down Expand Up @@ -73,7 +72,7 @@ class V3Updater @Inject constructor(
}

init {
AppInsightsTelemetry.start()
//AppInsightsTelemetry.start()
}

override fun addToUpdate(toUpdate: String): List<Release> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ open class GraphQLGitHubInterface @Inject constructor(

LOGGER.info("Retrying ${retryCount++}")
delay((TimeUnit.SECONDS.toMillis(5) * retryCount))
} catch (e: ClientRequestException) {
} catch (e: ResponseException) {
if (e.response.status == HttpStatusCode.Forbidden ||
e.response.status == HttpStatusCode.BadGateway ||
e.response.status == HttpStatusCode.ServiceUnavailable ||
Expand Down

0 comments on commit b7ae8f0

Please sign in to comment.