Skip to content

Conversation

@danchia
Copy link

@danchia danchia commented Dec 20, 2017

@bogdandrutu PTAL. The dependency management was in particular quite nasty, and ideas / feedback around that area greatly appreciated.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 20, 2017
<dependency>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-api</artifactId>
<version>0.10.1</version>

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@danchia
Copy link
Author

danchia commented Dec 21, 2017

I updated the PR to use census from BOM instead.


numResponses++;
if (numResponses == 1) {
Tracing.getTracer()

This comment was marked as spam.

This comment was marked as spam.

private static final String AUTO_ID_ALPHABET =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

public static final Tracer tracer = Tracing.getTracer();

This comment was marked as spam.

This comment was marked as spam.

span);
} else {
span.setStatus(
io.opencensus.trace.Status.ABORTED.withDescription("too many retries"));

This comment was marked as spam.

This comment was marked as spam.


@Override
public void onError(Throwable throwable) {
Tracing.getTracer().getCurrentSpan().addAnnotation("Firestore.BatchGet: Error");

This comment was marked as spam.

This comment was marked as spam.

numResponses++;
if (numResponses == 1) {
Tracing.getTracer()
.getCurrentSpan()

This comment was marked as spam.

This comment was marked as spam.

Copy link
Author

@danchia danchia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback, hope this addresses things.

private static final String AUTO_ID_ALPHABET =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

public static final Tracer tracer = Tracing.getTracer();

This comment was marked as spam.


numResponses++;
if (numResponses == 1) {
Tracing.getTracer()

This comment was marked as spam.

numResponses++;
if (numResponses == 1) {
Tracing.getTracer()
.getCurrentSpan()

This comment was marked as spam.


@Override
public void onError(Throwable throwable) {
Tracing.getTracer().getCurrentSpan().addAnnotation("Firestore.BatchGet: Error");

This comment was marked as spam.

span);
} else {
span.setStatus(
io.opencensus.trace.Status.ABORTED.withDescription("too many retries"));

This comment was marked as spam.

import io.opencensus.trace.Status;

/** Census tracing utilities. */
class TraceUtil {

This comment was marked as spam.

import io.opencensus.trace.Status;

/** Census tracing utilities. */
class TraceUtil {

This comment was marked as spam.

@@ -0,0 +1,35 @@
/*
* Copyright 2017 Google Inc. All Rights Reserved.

This comment was marked as spam.

This comment was marked as spam.

final Transaction.Function<T> transactionCallback,
final SettableApiFuture<T> resultFuture,
final TransactionOptions options) {
Span span = tracer.spanBuilder("CloudFirestore.Transaction").startSpan();

This comment was marked as spam.

This comment was marked as spam.

span);
} else {
span.setStatus(TOO_MANY_RETRIES_STATUS);
span.end();

This comment was marked as spam.

This comment was marked as spam.


ApiStreamObserver<BatchGetDocumentsResponse> responseObserver =
new ApiStreamObserver<BatchGetDocumentsResponse>() {
int numResponses;

This comment was marked as spam.

This comment was marked as spam.

@danchia
Copy link
Author

danchia commented Mar 6, 2018

@pongad do you have any other feedback?

@pongad
Copy link
Contributor

pongad commented Apr 19, 2018

@danchia Sorry for the late response. I was transferring and dropped a bunch of things. This LGTM. @garrettjonesgoogle Do you have any other comments?

Copy link
Member

@garrettjonesgoogle garrettjonesgoogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pongad pongad merged commit e7d5250 into googleapis:master Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants