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

Enforce Links limit #331

Merged

Conversation

mayurkale22
Copy link
Member

This PR will address the second part (enforce limits on links) of #316

@codecov-io
Copy link

codecov-io commented Feb 6, 2019

Codecov Report

Merging #331 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #331      +/-   ##
==========================================
- Coverage   94.95%   94.95%   -0.01%     
==========================================
  Files         120      120              
  Lines        8213     8281      +68     
  Branches      732      737       +5     
==========================================
+ Hits         7799     7863      +64     
- Misses        414      418       +4
Impacted Files Coverage Δ
test/test-ocagent.ts 91.58% <0%> (-2.21%) ⬇️
test/test-root-span.ts 100% <0%> (ø) ⬆️
test/test-span.ts 100% <0%> (ø) ⬆️
src/adapters.ts 96.9% <0%> (+0.03%) ⬆️
src/trace/model/span-base.ts 98.8% <0%> (+3.8%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 923148a...34ea4cf. Read the comment docs.

{value: 'boolValue', boolValue: true}
}
}
},
Copy link

Choose a reason for hiding this comment

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

you have checked the drop counts for links earlier but it would nice to check that oldest links is removed. you can either add this is as part of this or where you test the dropLinkCount.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good Point! We already have asset check here https://github.com/census-instrumentation/opencensus-node/pull/331/files#diff-0ab7878c00c0a6393dd66fd59e796156R482 for the links. Basically, it doesn't contain a dropped link object.

Copy link

Choose a reason for hiding this comment

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

as per our conversation, this is already taken care of in previous test 'should adapt a span correctly' on line 320.
so ignore the comment.

'my_annotation',
{myString: 'bar', myNumber: 123, myBoolean: true});

// Metric Event
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: "Message event"

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 34ea4cf


// Metric Event
const timeStamp = 123456789;
rootSpan.addMessageEvent('MessageEventTypeSent', 'ffff', timeStamp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious, why is this 'MessageEventTypeSent' and not just 'SENT'?

This would be for a follow up PR, but what would you think about adding enums for span kind, message event type and link type?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is legacy code, I am not sure rational behind this. Created an issue to track this -> #333. Thanks 👍

Copy link
Contributor

@draffensperger draffensperger left a comment

Choose a reason for hiding this comment

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

LGTM.

@mayurkale22 mayurkale22 merged commit e95a418 into census-instrumentation:master Feb 7, 2019
@mayurkale22 mayurkale22 deleted the enforce_links_limit branch February 7, 2019 21:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants