(traceID, spanID, name string, status *v1.Status, attributes ...*v1_common.KeyValue)
| 1785 | } |
| 1786 | |
| 1787 | func makeSpan(traceID, spanID, name string, status *v1.Status, attributes ...*v1_common.KeyValue) *v1.Span { |
| 1788 | if status == nil { |
| 1789 | status = &v1.Status{Code: v1.Status_STATUS_CODE_OK} |
| 1790 | } |
| 1791 | |
| 1792 | traceIDBytes, err := hex.DecodeString(traceID) |
| 1793 | if err != nil { |
| 1794 | panic(err) |
| 1795 | } |
| 1796 | spanIDBytes, err := hex.DecodeString(spanID) |
| 1797 | if err != nil { |
| 1798 | panic(err) |
| 1799 | } |
| 1800 | |
| 1801 | return &v1.Span{ |
| 1802 | Name: name, |
| 1803 | TraceId: traceIDBytes, |
| 1804 | SpanId: spanIDBytes, |
| 1805 | Status: status, |
| 1806 | Kind: v1.Span_SPAN_KIND_SERVER, |
| 1807 | Attributes: attributes, |
| 1808 | } |
| 1809 | } |
| 1810 | |
| 1811 | func makeScope(spans ...*v1.Span) *v1.ScopeSpans { |
| 1812 | return &v1.ScopeSpans{ |
no outgoing calls
no test coverage detected