Skip to content

Address few nits in transport-runtime #4925

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

Merged
merged 3 commits into from
Apr 24, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import com.google.android.datatransport.runtime.time.Clock;
import com.google.android.datatransport.runtime.time.Monotonic;
import com.google.android.datatransport.runtime.time.WallTime;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -113,6 +114,7 @@ public void upload(TransportContext transportContext, int attemptNumber, Runnabl
}

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@CanIgnoreReturnValue
public BackendResponse logAndUpdateState(TransportContext transportContext, int attemptNumber) {
TransportBackend backend = backendRegistry.get(transportContext.getBackendName());
long maxNextRequestWaitMillis = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,13 +680,15 @@ public ClientMetrics loadClientMetrics() {
.build());
}
populateLogSourcesMetrics(clientMetricsBuilder, metricsMap);
clientMetricsBuilder.setWindow(getTimeWindow());
clientMetricsBuilder.setGlobalMetrics(getGlobalMetrics());
clientMetricsBuilder.setAppNamespace(packageName.get());
return clientMetricsBuilder.build();
return clientMetricsBuilder
.setWindow(getTimeWindow())
.setGlobalMetrics(getGlobalMetrics())
.setAppNamespace(packageName.get())
.build();
}));
}

@SuppressWarnings("CheckReturnValue")
private void populateLogSourcesMetrics(
ClientMetrics.Builder clientMetricsBuilder, Map<String, List<LogEventDropped>> metricsMap) {
for (Map.Entry<String, List<LogEventDropped>> entry : metricsMap.entrySet()) {
Expand Down
1 change: 1 addition & 0 deletions transport/transport-runtime/transport-runtime.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ dependencies {
}

compileOnly "com.google.auto.value:auto-value-annotations:1.6.6"
compileOnly "com.google.errorprone:error_prone_annotations:2.9.0"

annotationProcessor "com.google.auto.value:auto-value:1.6.5"
annotationProcessor 'com.google.dagger:dagger-compiler:2.27'
Expand Down