Skip to content

Zipkin library#692

Merged
htuch merged 58 commits into
envoyproxy:masterfrom
amalgam8:zipkin
May 3, 2017
Merged

Zipkin library#692
htuch merged 58 commits into
envoyproxy:masterfrom
amalgam8:zipkin

Conversation

@fabolive
Copy link
Copy Markdown
Contributor

@fabolive fabolive commented Apr 4, 2017

This PR adds a Zipkin library to the Envoy code base. Changes made to Envoy to use this library to support Zipkin tracing are in PR #700. This needs to be merged before PR #700.

cc: @RomanDzhabarov, @adriancole, @mattklein123

@fabolive fabolive changed the title [WIP] Zipkin [WIP] Add request tracing with Zipkin Apr 4, 2017
@mattklein123
Copy link
Copy Markdown
Member

💥 very excited for this! Will let @RomanDzhabarov take first pass.

@rshriram
Copy link
Copy Markdown
Member

rshriram commented Apr 4, 2017

@htuch @rlazarus there is a source/zipkin folder. The code there is supposed to be a generic library. I am not sure whats the best way to bazel it up.

@RomanDzhabarov
Copy link
Copy Markdown
Member

@fabolive this is very exciting. Is there any chance to split this into multiple self-contained PRs?

@rshriram
Copy link
Copy Markdown
Member

rshriram commented Apr 4, 2017

@RomanDzhabarov one thing that we were discussing: the source/zipkin folder is a separate library. That could go in as its own PR. The rest is additions to http tracer. How does that sound?

@rshriram
Copy link
Copy Markdown
Member

rshriram commented Apr 4, 2017

cross referencing #628

@htuch
Copy link
Copy Markdown
Member

htuch commented Apr 4, 2017

I'd follow other examples of using envoy_cc_library and writing BUILD rules to Bazelify, see https://github.com/lyft/envoy/blob/master/bazel/DEVELOPER.md

@RomanDzhabarov
Copy link
Copy Markdown
Member

Yup, that high level separation sounds good.

@fabolive
Copy link
Copy Markdown
Contributor Author

fabolive commented Apr 4, 2017

@RomanDzhabarov I will then re-purpose this PR.

@rshriram
Copy link
Copy Markdown
Member

rshriram commented Apr 4, 2017

Just FYI, here is the front-proxy example with zipkin integration. https://gist.github.com/rshriram/15f05f530894eff3cebf527ca1ba5857

Comment thread source/common/http/conn_manager_impl.cc Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

prefer two XX

..
just kidding :P

Copy link
Copy Markdown
Contributor

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

very good. I've only identified a few edge cases, which is pretty amazing considering this is the first pass!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this comment out-of-date? I don't see x-b3-envoy listed in the code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is out of date, indeed.

Comment thread source/zipkin/zipkin_core_types.cc Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

timestamp and duration should only be set on server spans which are not client-originated (ex root spans which weren't resumed from headers)

openzipkin/openzipkin.github.io#49

In brave, we set a flag in the in-process struct representing the context called "shared" which is used to differentiate a client-originated root span from a server-originated one. (the former is shared, the latter is not). When a trace context is parsed from headers, shared is set to true. If it wasn't it defaults to false.

  /**
   * True if we are contributing to a span started by another tracer (ex on a different host).
   * Defaults to false.
   *
   * <p>When an RPC trace is client-originated, it will be sampled and the same span ID is used for
   * the server side. However, the server shouldn't set span.timestamp or duration since it didn't
   * start the span.
   */
  public abstract boolean shared();

We use this flag when creating the span (like it is here)

    // don't report server-side timestamp on shared or incomplete spans
    if (shared && (flags & FLAG_SR) != 0) {
      span.timestamp(null).duration(null);
    }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@adriancole The code you highlighted above is setting the timestamp of the annotation, not the span's. I make sure that only the span initiator sets the timestamp and duration of a span, as explained here: http://zipkin.io/pages/instrumenting.html

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lol yes.. you are right! eyes blurred

Comment thread source/zipkin/zipkin_core_types.h Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

endpoint is the proper name for this field (we haven't renamed the field in thrift, but all docs refer to it as endpoint iirc)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fair enough.

Comment thread source/zipkin/zipkin_core_types.h Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you can simplify this by only supporting BOOL and STRING as others are not used in practice in zipkin.

BOOL is a special case for identifying the peer address. for example, "ca", true, host=client address, not the local address.

https://github.com/openzipkin/zipkin-api/blob/master/thrift/zipkinCore.thrift#L226

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK.

Comment thread source/zipkin/zipkin_core_types.cc Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

on all the core annotations "cs" "sr" "ss" "cr" as well normal binary annotations (string value), the host will be constant for the tracer, as it is identifying the local process. I can't see clearly if that's the case in the current variant of this code, so just sayin..

There are special annotations "ca" and "sa" which identify the peer (incoming client or downstream server), which are optional but useful if you know it. I made a comment elsewhere on that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The current code guarantees that the same endpoint (identifying the envoy in question) is used for the annotations originating from the same envoy process.
Indeed, ca/sa might be useful.

@fabolive fabolive changed the title [WIP] Add request tracing with Zipkin [WIP] Zipkin library Apr 5, 2017
@fabolive
Copy link
Copy Markdown
Contributor Author

fabolive commented Apr 5, 2017

@RomanDzhabarov We have 2 PRs now. This one has been re-purposed to contain only the addition of a Zipkin library to the Envoy code base. PR #700, in turn, contains the changes to make Envoy use this library.

cc: @adriancole, @rshriram, @mattklein123

Comment thread source/zipkin/BUILD Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can just skip the deps if empty.

Comment thread source/zipkin/BUILD Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If any of these are purely internal to the library and don't need exporting for the use of other libraries, you can move them into srcs.

Comment thread source/zipkin/zipkin_core_types.cc Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

when an operation abends, is finish still called? if so, we'd usually put a string binary annotation of key "error" and value of the error message in the span

Copy link
Copy Markdown
Contributor Author

@fabolive fabolive Apr 11, 2017

Choose a reason for hiding this comment

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

In Envoy, when a connection is recycled the connection manager checks for errors. If an error is caught, it calls span.setTag(error, true), before calling span.finish(), to indicate that an error has occurred. In my code, span.setTag(key, value) essentially adds a binary annotation to the span. So, the code behaves just like you were expecting.
setTag: https://github.com/amalgam8/envoy/blob/zipkin/source/zipkin/zipkin_core_types.cc#L231

Comment thread test/zipkin/span_context_test.cc Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not sure if here or not, but should test that 128bit variant doesn't crash. All new instrumentation support 128-bit trace ids, so if you accept an inbound trace id, the choices are to truncate by dropping high bits, or better.. use all of them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have added a test to verify this behavior. Note that the Span class has a member named traceIdHigh_, plus a flag indicating whether or not it has been set. That's how a Span with a 128-bit trace id can be created. Currently, the code ignores the higher bits.
Here is the test I added:
https://github.com/amalgam8/envoy/blob/zipkin/test/zipkin/span_context_test.cc#L117

Comment thread test/zipkin/tracer_test.cc Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

presumably for json encoding bc thrift it is packed into a 32bit unsigned

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correct. Since the current implementation supports only JSON over HTTP, we are storing IP addresses as strings. When we support other transports, we will revisit that (and possibly a few other aspects of the core data structures).

Comment thread test/zipkin/tracer_test.cc Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this assumes the only sort of child span is a client span. That's ok if that's the intent

Copy link
Copy Markdown
Contributor Author

@fabolive fabolive Apr 11, 2017

Choose a reason for hiding this comment

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

Correct. In Envoy, that happens to be the case.

Copy link
Copy Markdown
Contributor

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

good progress!

Comment thread source/zipkin/tracer.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I suggest using full names instead of shorthands. E.g. endpoint instead of ep. Annotation instead of ann.

Comment thread source/zipkin/tracer.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Micro -> US or if it's not too lengthy, might as well use Microseconds

Comment thread source/zipkin/zipkin_core_types.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need this copy constructor if it's just a one to one assignment of ints and pointers to const objects ?

@fabolive fabolive changed the title [WIP] Zipkin library Zipkin library Apr 11, 2017
@fabolive
Copy link
Copy Markdown
Contributor Author

@adriancole: Have I answered your questions to your satisfaction? Have I addressed properly your concerns?
@RomanDzhabarov This is no longer a work-in-progress PR. I consider it ready, unless other issues are raised or the reviewers are not satisfied with my answers and latest commits that attempt to address their concerns.

cc: @rshriram

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Some high level comments to get started. Will review in more detail once these are cleaned up.

Comment thread source/CMakeLists.txt Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think I would add this as a top level directory. Please move to source/common/tracing/zipkin. There are other things we may eventually want to compile out via various build options that are already in common. We can deal with that at that point.

Comment thread source/zipkin/span_buffer.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

delete?

Comment thread source/zipkin/span_buffer.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All variables should use snake case. I won't comment on this further but please fix everywhere.

Comment thread source/zipkin/span_buffer.h Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove all standard headers that are already in precompiled.h (I won't comment on this in other places).

Comment thread source/zipkin/span_buffer.h Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

SpanSharedPtr (there might be other instances of this, won't comment further).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: put inside Zipkin namespace to avoid extra typing.

Comment thread source/zipkin/span_context.h Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To make the code easier to read/review, please have at minimum class level comments for each class/struct. Optimally, every public function should have proper doc comments to make it easier to review. (This applies everywhere, won't comment futher).

Comment thread source/zipkin/tracer.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please use TODO(your GH name): style for TODOs. (Applies elsewhere)

Comment thread source/zipkin/tracer.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You should have a stat here. If there are similar TODOs please also make sure there are error stats.

Comment thread source/zipkin/util.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is very slow, use common/hex.h instead.

@codefromthecrypt
Copy link
Copy Markdown
Contributor

codefromthecrypt commented Apr 11, 2017 via email

Comment thread source/zipkin/span_buffer.h Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

need comments on the methods

Comment thread source/zipkin/span_context.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

full name for 'ann'

Copy link
Copy Markdown
Member

@RomanDzhabarov RomanDzhabarov Apr 12, 2017

Choose a reason for hiding this comment

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

const Annotation& annotation

Comment thread source/zipkin/span_context.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

s/s/result or something

Comment thread source/zipkin/span_context.cc Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

const std::string&

@fabolive
Copy link
Copy Markdown
Contributor Author

fabolive commented Apr 28, 2017

@mattklein123 One more comment. The Zipkin library uses MonotonicTime to compute the span duration, but uses SystemTime for timestamps. Timestamps are rendered by the Zipkin UI as human-readable date/time.

@mattklein123
Copy link
Copy Markdown
Member

@fabolive cool will look at this in the morning and let's see if we can get this merged tomorrow. I think we are pretty close.

@mattklein123
Copy link
Copy Markdown
Member

Also, in the future, please don't rebase your change once you first push the PR. Just merge master and add commits. It makes it much easier to review the deltas.

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

This is looking great. I suspect there are quite a few opportunities for performance improvements, but we can sort that out once the code goes into production somewhere and we do some profiling.

A few small comments and then I think we are good to go. @htuch chime in if you feel like going through this at all.

Comment thread source/common/common/hex.cc Outdated
}

std::string Hex::uint64ToHex(uint64_t value) {
std::vector<uint8_t> data(8);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use std::array here to avoid heap allocation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please fix all the POD stuff per @htuch comments.

virtual const std::string& toJson() PURE;

protected:
std::string json_string_;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's pretty odd to have this be a member variable and basically use it as a temporary. I would get rid of this, and then have all the functions return a temporary. The compiler will optimize it.

@fabolive
Copy link
Copy Markdown
Contributor Author

@mattklein123 Please, see my latest commit to address your comments.
Note that, after I merged with master, check_format started failing for the files:
source/common/tracing/zipkin/BUILD
test/common/tracing/zipkin/BUILD
However, buildifier does not find anything wrong with the files. Any clue on how to fix this?

@mattklein123
Copy link
Copy Markdown
Member

@fabolive I think you are missing license() directive. Just run envoy/tools/check_format.py fix. Anyway this looks good to me. @htuch wanted to take a look and we can merge on Monday.

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

I did a style and code structure pass, I'm not a Zipkin expert so I'll defer to those who know more about its implementation.

data[1] = (value & 0x00FF000000000000) >> 48;
data[0] = (value & 0xFF00000000000000) >> 56;

return encode(&data[0], data.size());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This could also be done with std::hex and std::stringstream in 2-3 lines of code. Is there a reason you opted to do the manual unrolling? If so, please add a comment to the code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The reason is performance.

for (uint64_t i = 1; i < size; i++) {
stringified_json_array += ",";
stringified_json_array += span_buffer_[i]->toJson();
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You could consider using https://github.com/lyft/envoy/blob/master/source/common/json/json_loader.h#L22, which does basically what's being done here.

Copy link
Copy Markdown
Contributor Author

@fabolive fabolive May 1, 2017

Choose a reason for hiding this comment

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

Well, Json::Factory::listAsJsonString() does not do exactly the same thing. As a result of that method, the elements of the stringified json array are stringified as well, which means that an extra level of double-quote escaping would be present. That was not my intention.
I would, therefore, prefer to keep this code unchanged.

*
* @param size The desired buffer size.
*/
SpanBuffer(uint64_t size) { span_buffer_.reserve(size); }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably better to have this call allocateBuffer() to reserve the space to put the logic in a single location.

* Constructor that creates an empty buffer. Space needs to be allocated by invoking
* the method allocateBuffer(size).
*/
SpanBuffer() {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does anyone use the default constructor? If not I'd suggest removing it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is used by the code on PR #700. PR #700, which is supposed to be merged after this, makes use of the classes on this PR to perform the actual Zipkin tracing.


namespace Zipkin {

// The static functions below are needed due to C++ inability to safely concatenate static strings
Copy link
Copy Markdown
Member

@htuch htuch Apr 30, 2017

Choose a reason for hiding this comment

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

You can just say "due to the C++ static initialization order fiasco.". Most C++ programmers should know what that means (or Google it).

void Span::finish() {
// Assumption: Span will have only one annotation when this method is called
SpanContext context(*this);
if ((context.isSetAnnotation().sr_) && (!context.isSetAnnotation().ss_)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: unnecessary parentheses.

}

auto t = tracer();
if (t) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: if (auto t = tracer()) {

}

void Span::setTag(const std::string& name, const std::string& value) {
if ((name.size() > 0) && (value.size() > 0)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: unnecessary parentheses.

Comment thread source/common/tracing/zipkin/tracer.cc Outdated

// Set the timestamp globally for the span
span_ptr->setTimestamp(timestamp_micro);
} else if ((previous_context.isSetAnnotation().cs_) &&
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: unnecessary parentheses (and all other places).

/**
* Returns a randomly-generated 64-bit integer number.
*/
static uint64_t generateRandom64();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not always use RandomGenerator()? Is there a good reason to do random number generation differently here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Originally, my intention was to write a Zipkin library independent from Envoy. The code on PR #700 was supposed to be the only glue between Envoy and the Zipkin library. That's why my original code (which is long gone after several code-review rounds) did not use any of the classes and utilities from the Envoy code base. That includes random-number generation.

Copy link
Copy Markdown
Contributor Author

@fabolive fabolive May 1, 2017

Choose a reason for hiding this comment

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

I would like to keep this, at least for now.

@fabolive
Copy link
Copy Markdown
Contributor Author

fabolive commented May 1, 2017

@htuch Please, see my commits above, as well as my replies to your comments.
cc: @mattklein123, @rshriram

mattklein123
mattklein123 previously approved these changes May 2, 2017
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

LGTM. @htuch any final comments?

@htuch
Copy link
Copy Markdown
Member

htuch commented May 2, 2017

I'll make another pass this arvo.

@fabolive
Copy link
Copy Markdown
Contributor Author

fabolive commented May 2, 2017

@htuch I will make one more commit. I have applied the singleton constant template to zipkin_json_field_names.h, but forgot to apply it to zipkin_core_constants.h. I will commit shortly.
cc: @mattklein123

@fabolive
Copy link
Copy Markdown
Contributor Author

fabolive commented May 2, 2017

@htuch, @mattklein123. I have just pushed one more commit. This should be the last planned one.

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

@htuch can you merge this if you are OK at this point.

Copy link
Copy Markdown
Member

@htuch htuch 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 contribution, @fabolive, this is huge.

One small request for the future - I'd really be interested in being involved in the review process early on where I can provide rapid feedback on small PRs. I feel I only have the bandwidth in this PR to pick up on some surface level stuff due to its size, having smaller PRs would be helpful to reviewers in focussing on the important aspects of the PR.

annotation_values_.sr_ = true;
} else if (annotation_value == ZipkinCoreConstants::get().SERVER_SEND) {
annotation_values_.ss_ = true;
}
Copy link
Copy Markdown
Member

@htuch htuch May 3, 2017

Choose a reason for hiding this comment

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

There is some commonality in this if-else block with the constructor block that does the same. Please consider refactoring in the future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@htuch, @mattklein123, @RomanDzhabarov, @adriancole : Thanks for your reviews!
@htuch: I will make sure the other PRs are smaller and will pull you early on in the process. I will consider the code refactoring suggested above.
I will resume the work on PR #700 and let you guys know when you can take a look at it. The code in that branch is outdated now.

@htuch htuch merged commit b6af9c4 into envoyproxy:master May 3, 2017
@fabolive fabolive mentioned this pull request May 5, 2017
@fabolive fabolive deleted the zipkin branch May 22, 2017 20:01
@codefromthecrypt
Copy link
Copy Markdown
Contributor

Hey folks Fyi #1196 aims to remove this work, pushing it to a separate repository making changes to support zipkin indirect. I'm concerned as it seems to be discussed without many of you providing input. I just want to make sure you are cool or voices are heard otherwise. If you are cool, cool with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants