census-instrumentation / opencensus-csharp

Distributed tracing and stats collecting framework
https://opencensus.io
Apache License 2.0
139 stars 32 forks source link

Change span.Kind API to make sure it set early #46

Closed SergeyKanzhelev closed 5 years ago

SergeyKanzhelev commented 6 years ago

Span.Kind should be set early to allow correct metrics calculation. This should be reflected in API design - getter/setter pattern may not be ideal here. Consider requiring span Kind in constructor or Create method.

SergeyKanzhelev commented 5 years ago

Ideally - span kind should be passed on creation of a span builder and should not be changeable (no setter) after that.