Source File
snapshot.go
Belonging Package
go.opentelemetry.io/otel/sdk/trace
// Copyright The OpenTelemetry Authors// SPDX-License-Identifier: Apache-2.0package trace // import "go.opentelemetry.io/otel/sdk/trace"import ()// snapshot is an record of a spans state at a particular checkpointed time.// It is used as a read-only representation of that state.type snapshot struct {name stringspanContext trace.SpanContextparent trace.SpanContextspanKind trace.SpanKindstartTime time.TimeendTime time.Timeattributes []attribute.KeyValueevents []Eventlinks []Linkstatus StatuschildSpanCount intdroppedAttributeCount intdroppedEventCount intdroppedLinkCount intresource *resource.ResourceinstrumentationScope instrumentation.Scope}var _ ReadOnlySpan = snapshot{}func (snapshot) () {}// Name returns the name of the span.func ( snapshot) () string {return .name}// SpanContext returns the unique SpanContext that identifies the span.func ( snapshot) () trace.SpanContext {return .spanContext}// Parent returns the unique SpanContext that identifies the parent of the// span if one exists. If the span has no parent the returned SpanContext// will be invalid.func ( snapshot) () trace.SpanContext {return .parent}// SpanKind returns the role the span plays in a Trace.func ( snapshot) () trace.SpanKind {return .spanKind}// StartTime returns the time the span started recording.func ( snapshot) () time.Time {return .startTime}// EndTime returns the time the span stopped recording. It will be zero if// the span has not ended.func ( snapshot) () time.Time {return .endTime}// Attributes returns the defining attributes of the span.func ( snapshot) () []attribute.KeyValue {return .attributes}// Links returns all the links the span has to other spans.func ( snapshot) () []Link {return .links}// Events returns all the events that occurred within in the spans// lifetime.func ( snapshot) () []Event {return .events}// Status returns the spans status.func ( snapshot) () Status {return .status}// InstrumentationScope returns information about the instrumentation// scope that created the span.func ( snapshot) () instrumentation.Scope {return .instrumentationScope}// InstrumentationLibrary returns information about the instrumentation// library that created the span.func ( snapshot) () instrumentation.Library { //nolint:staticcheck // This method needs to be define for backwards compatibilityreturn .instrumentationScope}// Resource returns information about the entity that produced the span.func ( snapshot) () *resource.Resource {return .resource}// DroppedAttributes returns the number of attributes dropped by the span// due to limits being reached.func ( snapshot) () int {return .droppedAttributeCount}// DroppedLinks returns the number of links dropped by the span due to limits// being reached.func ( snapshot) () int {return .droppedLinkCount}// DroppedEvents returns the number of events dropped by the span due to// limits being reached.func ( snapshot) () int {return .droppedEventCount}// ChildSpanCount returns the count of spans that consider the span a// direct parent.func ( snapshot) () int {return .childSpanCount}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |