Skip to content

Commit

Permalink
fix: proxy url and fallback, logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori committed Aug 7, 2024
1 parent 03ac301 commit 4720f48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/main/kotlin/LocalEvaluationClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ class LocalEvaluationClient internal constructor(
) {
evaluation.evaluate(enrichedUser.toEvaluationContext(), sortedFlagConfigs)
}
Logger.d("evaluate - user=$enrichedUser, result=$evaluationResults")
val variants = evaluationResults.toVariants()
assignmentService?.track(Assignment(user, variants))
return variants
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/cohort/CohortApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ internal class DynamicCohortApi(
} catch (e: CohortTooLargeException) {
throw e
} catch (e: Exception) {
Logger.e("Downloading cohort $cohortId from proxy failed. Falling back to Amplitude.", e)
metrics.onCohortDownloadOriginFallback(e)
getCohort(serverUrl, cohortId, cohort)
}
Expand All @@ -92,7 +93,7 @@ internal class DynamicCohortApi(
queries["lastModified"] = "${cohort.lastModified}"
}
httpClient.get<GetCohortResponse>(
serverUrl = serverUrl,
serverUrl = url,
path = "sdk/v1/cohort/$cohortId",
headers = headers,
queries = queries,
Expand Down

0 comments on commit 4720f48

Please sign in to comment.