Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): pulling release/1.25.0 into master #477

Merged
merged 3 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.25.0](https://github.com/rudderlabs/rudder-sdk-android/compare/v1.24.0...v1.25.0) (2024-08-27)


### Features

* add option to configure `dataPlaneUrl` as the metrics url ([#471](https://github.com/rudderlabs/rudder-sdk-android/issues/471)) ([f0d3ef1](https://github.com/rudderlabs/rudder-sdk-android/commit/f0d3ef130fa75dff0a1162792f04279ba78055b1))

## [1.24.0](https://github.com/rudderlabs/rudder-sdk-android/compare/v1.23.3...v1.24.0) (2024-07-31)


Expand Down
8 changes: 3 additions & 5 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ dependencies {
implementation 'androidx.annotation:annotation:1.6.0'


implementation 'com.rudderstack.android.sdk:rudderreporter:[0.4.0, 0.6.0)'
// implementation(project(path: ':rudderreporter'))
// implementation(project(path: ':gsonrudderadapter'))
implementation 'com.rudderstack.kotlin.sdk:gsonrudderadapter:[0.2.0, 0.3.0)'
implementation 'com.rudderstack.android.sdk:rudderreporter:0.6.0'
implementation 'com.rudderstack.kotlin.sdk:gsonrudderadapter:0.2.0'

// required for new life cycle methods
compileOnly 'androidx.lifecycle:lifecycle-process:2.6.1'
Expand Down Expand Up @@ -89,4 +87,4 @@ tasks.withType(JavaExec) {
//apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"

apply from: rootProject.file('gradle/mvn-publish.gradle')
apply from: rootProject.file('gradle/codecov.gradle')
apply from: rootProject.file('gradle/codecov.gradle')
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private void initiateRudderReporterFromPrefetchedConfig() {
if (serverConfig != null && serverConfig.source != null
&& serverConfig.source.sourceConfiguration != null) {
RudderLogger.logDebug("EventRepository: constructor: Prefetched source serverConfig is available");
enableStatsCollection(application, writeKey, serverConfig.source.sourceConfiguration.getStatsCollection());
enableStatsCollection(application, writeKey, serverConfig.source.sourceConfiguration.getStatsCollection(), dataResidencyManager.getDataPlaneUrl());
} else {
RudderLogger.logDebug("EventRepository: constructor: Prefetched source serverConfig is not available");
}
Expand Down Expand Up @@ -271,8 +271,6 @@ private void initiateSDK(@Nullable RudderConsentFilter consentFilter) {
if (serverConfig != null) {
isSDKEnabled = serverConfig.source.isSourceEnabled;
if (isSDKEnabled) {
if (serverConfig.source.sourceConfiguration != null)
enableStatsCollection(application, writeKey, serverConfig.source.sourceConfiguration.getStatsCollection());
dataResidencyManager.setDataResidencyUrls(serverConfig);
dataPlaneUrl = dataResidencyManager.getDataPlaneUrl();
if (dataPlaneUrl == null) {
Expand All @@ -281,6 +279,8 @@ private void initiateSDK(@Nullable RudderConsentFilter consentFilter) {
Collections.singletonMap(LABEL_TYPE, LABEL_TYPE_DATA_PLANE_URL_INVALID));
return;
}
if (serverConfig.source.sourceConfiguration != null)
enableStatsCollection(application, writeKey, serverConfig.source.sourceConfiguration.getStatsCollection(), dataPlaneUrl);
if (consentFilter != null)
this.consentFilterHandler = new ConsentFilterHandler(serverConfig.source, consentFilter);
cloudModeManager.startCloudModeProcessor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ private ReportManager() {
private static final String FLUSH_WORKER_INIT_COUNTER_TAG = "flush_worker_init";
private static final String ENCRYPTED_DB_COUNTER_TAG = "db_encrypt";

private static final String METRICS_URL_DEV = "https://sdk-metrics.dev-rudder.rudderlabs.com/";
private static final String METRICS_URL_PROD = "https://sdk-metrics.rudderstack.com/";
private static Metrics metrics = null;
private static ErrorClient errorStatsClient = null;

Expand Down Expand Up @@ -161,15 +159,15 @@ private static void incrementCounter(LongCounter counter, int value) {

@SuppressWarnings("ConstantConditions")
static void enableStatsCollection(Application application, String writeKey,
@NonNull SourceConfiguration.StatsCollection statsCollection) {
@NonNull SourceConfiguration.StatsCollection statsCollection, String dataPlaneUrl) {
if (!isStatsReporterAvailable()) {
if (!(statsCollection.getMetrics().isEnabled() || statsCollection.getErrors().isEnabled())) {
RudderLogger.logDebug("EventRepository: Stats collection is not enabled");
return;
}
RudderLogger.logDebug("EventRepository: Creating Stats Reporter");
initiateRudderReporter(application, writeKey, statsCollection.getMetrics().isEnabled(),
statsCollection.getErrors().isEnabled());
statsCollection.getErrors().isEnabled(), dataPlaneUrl);
RudderLogger.logDebug("EventRepository: Metrics collection is not initialized");
return;
}
Expand Down Expand Up @@ -211,10 +209,10 @@ private static void checkAndUpdateErrorsCollection(boolean isErrorsEnabled) {
}

private static void initiateRudderReporter(Context context, @Nullable String writeKey,
boolean isMetricsEnabled, boolean isErrorsEnabled) {
boolean isMetricsEnabled, boolean isErrorsEnabled, String dataPlaneUrl) {
RudderLogger.logDebug("EventRepository: Creating RudderReporter isMetricsEnabled: " + isMetricsEnabled + " isErrorsEnabled: " + isErrorsEnabled);
if (rudderReporter == null) {
rudderReporter = new DefaultRudderReporter(context, METRICS_URL_PROD,
rudderReporter = new DefaultRudderReporter(context, dataPlaneUrl,
getStatsConfig(writeKey), new GsonAdapter(), isMetricsEnabled, isErrorsEnabled);
rudderReporter.getSyncer().startScheduledSyncs(METRICS_UPLOAD_INTERVAL,
true, METRICS_FLUSH_COUNT);
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android.enableJetifier=true
android.enableR8.fullMode=true
kotlin.code.style=official
GROUP=com.rudderstack.android.sdk
VERSION_CODE=31
VERSION_NAME=1.24.0
VERSION_CODE=32
VERSION_NAME=1.25.0
POM_NAME=Rudderstack SDK for android
POM_DESCRIPTION=Rudderstack SDK for android
POM_ARTIFACT_ID=core
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.24.0",
"version": "1.25.0",
"dependencies": {
"properties-reader": "^2.2.0"
}
Expand Down
Loading