Use enum for MessageEvent Type, Link Type and SpanKind#334
Conversation
| /** An event describing a message sent/received between Spans. */ | ||
| export enum MessageEventType { | ||
| /** Unknown event type. */ | ||
| UNSPECIFIED = 0, |
There was a problem hiding this comment.
I do like the numeric enums here so on balance I recommend keeping them this way (nice correspondence with the protos too). But on the other hand, use of a string enum could enable the breaking change to be less significant since the strings 'SENT' and 'RECEIVED' would still be valid. Just mentioning it because it's in my mind, but recommend keeping it this way!
There was a problem hiding this comment.
I compared with other lang. implementation, we use numeric enums for these (Kind, Link and MessageEvent) types. I am trying to get most of the breaking change in this and next release before going to Beta.
There was a problem hiding this comment.
Makes sense. The sooner the breaking changes come the less the pain in the future.
c481b6b to
bc2791f
Compare
Codecov Report
@@ Coverage Diff @@
## master #334 +/- ##
==========================================
+ Coverage 94.93% 94.98% +0.04%
==========================================
Files 120 120
Lines 8315 8332 +17
Branches 739 741 +2
==========================================
+ Hits 7894 7914 +20
+ Misses 421 418 -3
Continue to review full report at Codecov.
|
Fixes #333