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

feat(#381): adds zipkin-js.flush annotation for when a span is report… #416

Merged
merged 2 commits into from
Jul 20, 2019

Conversation

jcchavezs
Copy link
Contributor

This PR makes it possible to add a zipkin-js.flush annotation for a span when it is reported due to timeout (i.e. the span has been notified but the finish method was not called).

Closes #381

Ping @adriancole

Copy link
Member

@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.

thanks!

@jcchavezs jcchavezs force-pushed the 381_adds_zipkin_js_flush_annotation branch 2 times, most recently from 768c17d to 8c6e210 Compare July 20, 2019 07:55
@@ -172,6 +172,11 @@ describe('Batch Recorder', () => {
expect(loggedSpan.timestamp).to.equal(12345678000);
expect(loggedSpan.duration).to.equal(123);

for (let i = 0; i < loggedSpan.annotations.length; i = i + 1) {
// we make sure it does not include the zipkin-js.flush annotation
expect(loggedSpan.annotations[i].value === 'zipkin-js.flush').to.equal(false);
Copy link
Member

Choose a reason for hiding this comment

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

good idea

@jcchavezs
Copy link
Contributor Author

jcchavezs commented Jul 20, 2019 via email

@codefromthecrypt
Copy link
Member

lint fail

/home/travis/build/openzipkin/zipkin-js/packages/zipkin/test/batch-recorder.test.js
  175:58  error  Assignment can be replaced with operator assignment  operator-assignment

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

@jcchavezs jcchavezs force-pushed the 381_adds_zipkin_js_flush_annotation branch from 8c6e210 to 705231a Compare July 20, 2019 08:15
@jcchavezs
Copy link
Contributor Author

Let's see if this change fixes it.

@jcchavezs jcchavezs merged commit 4a876f3 into master Jul 20, 2019
@jcchavezs jcchavezs deleted the 381_adds_zipkin_js_flush_annotation branch July 20, 2019 14:39
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.

add 'zipkin-js.flush' annotation when data is kicked out
2 participants