1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-23 22:34:47 +02:00

rename finish to end (#150)

* rename finish -> end

* missed a few finish -> end spots

* change end back to finish for the bridge span in the openTracing bridge

* fixed grammar, ran make
This commit is contained in:
Alyson van Hardenberg
2019-09-27 10:48:10 -07:00
committed by rghetia
parent e86b95c440
commit 0eb73325ce
25 changed files with 93 additions and 93 deletions

View File

@@ -31,7 +31,7 @@ type span struct {
initial exporter.ScopeID
}
// SpancContext returns span context of the span. Return SpanContext is usable
// SpanContext returns span context of the span. Returned SpanContext is usable
// even after the span is finished.
func (sp *span) SpanContext() core.SpanContext {
return sp.initial.SpanContext
@@ -87,15 +87,15 @@ func (sp *span) ModifyAttributes(mutators ...tag.Mutator) {
})
}
func (sp *span) Finish(options ...trace.FinishOption) {
func (sp *span) End(options ...trace.EndOption) {
recovered := recover()
opts := trace.FinishOptions{}
opts := trace.EndOptions{}
for _, opt := range options {
opt(&opts)
}
sp.tracer.exporter.Record(exporter.Event{
Time: opts.FinishTime,
Type: exporter.FINISH_SPAN,
Time: opts.EndTime,
Type: exporter.END_SPAN,
Scope: sp.ScopeID(),
Recovered: recovered,
})