Skip to content

Commit

Permalink
just add datadog keys directly
Browse files Browse the repository at this point in the history
  • Loading branch information
atavism committed Sep 7, 2023
1 parent 625b75b commit 97a0c5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
19 changes: 5 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -335,21 +335,18 @@ $(MOBILE_RELEASE_APK): $(MOBILE_SOURCES) $(GO_SOURCES) $(MOBILE_ANDROID_LIB) req
echo $(MOBILE_ANDROID_LIB) && \
mkdir -p ~/.gradle && \
ln -fs $(MOBILE_DIR)/gradle.properties . && \
DD_CLIENT_TOKEN="$$DD_CLIENT_TOKEN" && \
DD_APPLICATION_ID="$$DD_APPLICATION_ID" && \
DATADOG_API_KEY="${DATADOG_API_KEY}" && \
COUNTRY="$$COUNTRY" && \
STAGING="$$STAGING" && \
STICKY_CONFIG="$$STICKY_CONFIG" && \
PAYMENT_PROVIDER="$$PAYMENT_PROVIDER" && \
VERSION_CODE="$$VERSION_CODE" && \
DEVELOPMENT_MODE="$$DEVELOPMENT_MODE" && \
DART_DEFINES=`make dart-defines-release` && \
$(GRADLE) -PlanternVersion=$$VERSION -Pdart-defines="$$DART_DEFINES" -PlanternRevisionDate=$(REVISION_DATE) -PddClientToken="$(DD_CLIENT_TOKEN)" \
-PddApplicationID="$(DD_APPLICATION_ID)" -PandroidArch=$(ANDROID_ARCH) -PandroidArchJava="$(ANDROID_ARCH_JAVA)" -PproServerUrl=$(PRO_SERVER_URL) \
$(GRADLE) -PlanternVersion=$$VERSION -Pdart-defines="$$DART_DEFINES" -PlanternRevisionDate=$(REVISION_DATE) \
-PandroidArch=$(ANDROID_ARCH) -PandroidArchJava="$(ANDROID_ARCH_JAVA)" -PproServerUrl=$(PRO_SERVER_URL) \
-PpaymentProvider=$(PAYMENT_PROVIDER) -Pcountry=$(COUNTRY) -PplayVersion=$(FORCE_PLAY_VERSION) -PuseStaging=$(STAGING) -PstickyConfig=$(STICKY_CONFIG) \
-PversionCode=$(VERSION_CODE) -PdevelopmentMode=$(DEVELOPMENT_MODE) -b $(MOBILE_DIR)/app/build.gradle assembleProdSideload && \
DATADOG_SITE=datadoghq.eu datadog-ci flutter-symbols upload --service-name lantern-android --dart-symbols-location build/app/intermediates/merged_native_libs/prodSideload/out/lib \
DATADOG_API_KEY=4901456bb88bbf1dc7799eab7d4f71ae DATADOG_SITE=datadoghq.eu datadog-ci flutter-symbols upload --service-name lantern-android --dart-symbols-location build/app/intermediates/merged_native_libs/prodSideload/out/lib \
--android-mapping-location build/app/outputs/mapping/prodSideload/mapping.txt --android-mapping --ios-dsyms && \
cp $(MOBILE_ANDROID_RELEASE) $(MOBILE_RELEASE_APK) && \
cat $(MOBILE_RELEASE_APK) | bzip2 > lantern_update_android_arm.bz2
Expand All @@ -366,15 +363,9 @@ $(MOBILE_BUNDLE): $(MOBILE_SOURCES) $(GO_SOURCES) $(MOBILE_ANDROID_LIB) require-
-Pcountry=$(COUNTRY) -PplayVersion=true -PuseStaging=$(STAGING) -PstickyConfig=$(STICKY_CONFIG) -b $(MOBILE_DIR)/app/build.gradle bundlePlay && \
cp $(MOBILE_ANDROID_BUNDLE) $(MOBILE_BUNDLE)

android-debug: $(MOBILE_DEBUG_APK)

vault-secrets:
$(eval DD_APPLICATION_ID := $(shell make vault-secret-DD_APPLICATION_ID))
$(eval DD_CLIENT_TOKEN := $(shell make vault-secret-DD_CLIENT_TOKEN))
$(eval DATADOG_API_KEY := $(shell make vault-secret-DATADOG_API_KEY))

android-debug: vault-secrets $(MOBILE_DEBUG_APK)

android-release: pubget vault-secrets $(MOBILE_RELEASE_APK)
android-release: pubget $(MOBILE_RELEASE_APK)

android-bundle: $(MOBILE_BUNDLE)

Expand Down
4 changes: 0 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ android {
buildConfigField "boolean", "STICKY_CONFIG", getBoolean("stickyConfig")
buildConfigField "boolean", "STAGING", getBoolean("useStaging")
buildConfigField "boolean", "PLAY_VERSION", getBoolean("playVersion")
buildConfigField "String", "DD_CLIENT_TOKEN", ddClientToken()
buildConfigField "String", "DD_APPLICATION_ID", ddApplicationID()
buildConfigField "String", "COUNTRY", userCountry()
buildConfigField "String", "SIGNING_CERTIFICATE_SHA256", "\"\""
buildConfigField "String", "PAYMENT_PROVIDER", paymentProvider()
Expand All @@ -220,8 +218,6 @@ android {
buildConfigField "boolean", "STICKY_CONFIG", getBoolean("stickyConfig")
buildConfigField "boolean", "STAGING", getBoolean("useStaging")
buildConfigField "boolean", "PLAY_VERSION", getBoolean("playVersion")
buildConfigField "String", "DD_CLIENT_TOKEN", ddClientToken()
buildConfigField "String", "DD_APPLICATION_ID", ddApplicationID()
buildConfigField "String", "COUNTRY", userCountry()
buildConfigField "String", "SIGNING_CERTIFICATE_SHA256", "\"108f612ae55354078ec12b10bb705362840d48fa78b9262c11b6d0adeff6f289\""
buildConfigField "String", "PAYMENT_PROVIDER", paymentProvider()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import com.datadog.android.rum.RumActionType
import com.datadog.android.rum.RumErrorSource
import com.datadog.android.rum.RumMonitor
import com.datadog.android.rum.tracking.ActivityViewTrackingStrategy
import org.getlantern.lantern.BuildConfig
import org.getlantern.lantern.LanternApp
import org.getlantern.mobilesdk.Logger
import java.net.InetSocketAddress
Expand All @@ -35,9 +34,9 @@ object Datadog {
datadogConfig = createDatadogConfiguration()

val datadogCredentials = Credentials(
clientToken = BuildConfig.DD_CLIENT_TOKEN,
clientToken = "puba617ab01333a95a25a9d3709f04e1654",
envName = "prod",
rumApplicationId = BuildConfig.DD_APPLICATION_ID,
rumApplicationId = "f8eabf3c-5db3-4f7e-8e6a-5a72433b46d2",
variant = "release",
serviceName = "lantern-android",
)
Expand Down

0 comments on commit 97a0c5b

Please sign in to comment.