-
Notifications
You must be signed in to change notification settings - Fork 79
update SpanID type in http propagation to adhere to trace API V2 spec #254
base: master
Are you sure you want to change the base?
update SpanID type in http propagation to adhere to trace API V2 spec #254
Conversation
…l encoding of an 8-byte array
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
==========================================
- Coverage 72.02% 72.01% -0.02%
==========================================
Files 17 17
Lines 1691 1690 -1
==========================================
- Hits 1218 1217 -1
Misses 397 397
Partials 76 76
Continue to review full report at Codecov.
|
@rghetia @bogdandrutu could one of you gents please take a look at this when you get a chance? |
@anovitskiy thanks for the changes. |
Thanks, @rghetia |
What I meant was that the new format is encoding spanid into a hex string but if on the other side if it is expecting decimal string then it won't work. |
Hopefully for most users the calls to SpanContextToRequest() and SpanContextFromRequest() are in the same library but the release version should indicate that this is a potentially breaking change. Open to ideas on how else to version this change. |
Breaking change is not desirable at this point given that opencensus is replaced by opentelemetry.
type HTTPFormat struct{
version int
}
const (
httpFormatVersion2 = 2
)
func NewHTTPFormatV2() HTTPFormat {
return HTTPFormat{
version: httpFormatVersion2,
}
} the other option is to 'With*' style option to configure func NewHTTPFormat(o Options...) {
} Options approach may be too much as I don't expect more options in the future. |
A third option would be to preserve the original trace and span IDs as strings instead of decoding and encoding. Was the original design chosen in order to conserve memory? |
According to https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite