Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

add adjuster property to always apply timestamp and duration if missing #36

Closed
wants to merge 2 commits into from

Conversation

naoman
Copy link
Collaborator

@naoman naoman commented Mar 13, 2017

PR for #25
Adding a property to Finagle adjuster to allow applying timestamp and duration without looking at the binary annotations. This rectifies the finagle Span model issue for non-finagle libraries that use finagle model for instrumentation.

* This back fills timestamp and duration for Spans coming from Finagle Span model, even if
* they are generated by non-finagle libraries.
*/
Builder alwaysApplyTimestampAndDuration(boolean alwaysApplyTimestampAndDuration);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Property name is not very intuitive. Any suggestions?

@naoman
Copy link
Collaborator Author

naoman commented Mar 14, 2017

cc @adriancole

@codefromthecrypt
Copy link

codefromthecrypt commented Mar 15, 2017 via email

@naoman
Copy link
Collaborator Author

naoman commented Mar 15, 2017

I think we should keep this in the same adjuster class (FinagleAdjuster) for following two reasons:

  1. We are making an adjustment for Finagle Span model shortcomings, so anyone who was using Finagle Span model for library instrumentation will need this.
  2. The adjustment is exactly same as the "apply-timestamp-and-duration" adjustment, just the condition to apply is different. So its better to reuse the code, instead of having multiple copies.

@codefromthecrypt
Copy link

codefromthecrypt commented Mar 15, 2017 via email

@naoman
Copy link
Collaborator Author

naoman commented Mar 16, 2017

While lack of timestamp and duration is not finagle centric, it is an issue with finagle. Even before this change, we were adjusting timestamp and duration for spans coming form finagle libraries. With this change, all we are doing is extending it to the spans that are created based on finagle span model. Finagle is the common factor here.

I understand that other libraries can also have this issue, but lets tackle that when we run into them. Maybe they need a different handling than this. In case of finagle, we know that the "adjustment" is exactly same in both cases (spans coming from finagle library, and spans coming based on finagle model).

I've updated the property name to make it explicit.

@codefromthecrypt
Copy link

codefromthecrypt commented Mar 16, 2017

I don't agree at all with this change. finagleSpanModel is jargon I've not heard of before.

openzipkin/openzipkin.github.io#49 has details on many libraries which all need to accomodate timestamp and duration. This is a well investigated topic, it isn't at all hypothetical.

On the other hand the "non-finagle" libraries you are hinting at must not be open source, which hints to me that using a custom adjuster is probably the way out. Finagle always adds finagle version properties and the point of this module is to address the finagle library.

@codefromthecrypt
Copy link

here's a summary of the approach I mentioned for how to address libraries that simply don't report timestamp or duration (regardless of how finagly) #37

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants