8000 Release v0.1.3: proto: add Zipkin proto + converter (#88) · easyops-cn/zipkin-go · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

v0.1.3

tagged this 07 Nov 13:50
* proto: add Zipkin proto + converter

Added:
a) Zipkin v2 Proto3 definitions from
https://github.com/openzipkin/zipkin-api/blob/6dfa27520abb62de7b01dba04683177afaa40c8c/zipkin.proto

b) a helper Protobuf function ParseSpans to parse
model.SpanModel-s from the serialized protobuf data

as well as an end-to-end test.

Fixes #87
Spawned by https://github.com/census-instrumentation/opencensus-service/pull/155

* proto/*/convert_proto.go: rename zps to s, return err early

Addressing review feedback:
* Rename zps to s
* On encountering any error during protoSpan->zipkinModelSapn,
return ASAP

* proto/*/v2: move payload to a global variable

Requested in codereview feedback

* proto/*/v2: make fmt.Errorf calls more descriptive

Provide a more descriptive context in fmt.Errorf
calls to match the style in:
https://github.com/openzipkin/zipkin-go/blob/master/propagation/b3/shared.go

* proto/*/v2: test and assert known failures

Test to ensure that the failures that we know
could happen e.g.
* Missing/invalid length TraceID
* Missing/invalid length SpanID
* Invalid length ParentSpanID

are caught and report errors instead of successfully
parsing.
Also tweaked the errors returned to be more descriptive
and graceful.
Assets 2
Loading
0