type TracerConfig … // InstrumentationVersion returns the version of the library providing instrumentation. func (t *TracerConfig) InstrumentationVersion() string { … } // InstrumentationAttributes returns the attributes associated with the library // providing instrumentation. func (t *TracerConfig) InstrumentationAttributes() attribute.Set { … } // SchemaURL returns the Schema URL of the telemetry emitted by the Tracer. func (t *TracerConfig) SchemaURL() string { … } // NewTracerConfig applies all the options to a returned TracerConfig. func NewTracerConfig(options ...TracerOption) TracerConfig { … } type TracerOption … type tracerOptionFunc … func (fn tracerOptionFunc) apply(cfg TracerConfig) TracerConfig { … } type SpanConfig … // Attributes describe the associated qualities of a Span. func (cfg *SpanConfig) Attributes() []attribute.KeyValue { … } // Timestamp is a time in a Span life-cycle. func (cfg *SpanConfig) Timestamp() time.Time { … } // StackTrace checks whether stack trace capturing is enabled. func (cfg *SpanConfig) StackTrace() bool { … } // Links are the associations a Span has with other Spans. func (cfg *SpanConfig) Links() []Link { … } // NewRoot identifies a Span as the root Span for a new trace. This is // commonly used when an existing trace crosses trust boundaries and the // remote parent span context should be ignored for security. func (cfg *SpanConfig) NewRoot() bool { … } // SpanKind is the role a Span has in a trace. func (cfg *SpanConfig) SpanKind() SpanKind { … } // NewSpanStartConfig applies all the options to a returned SpanConfig. // No validation is performed on the returned SpanConfig (e.g. no uniqueness // checking or bounding of data), it is left to the SDK to perform this // action. func NewSpanStartConfig(options ...SpanStartOption) SpanConfig { … } // NewSpanEndConfig applies all the options to a returned SpanConfig. // No validation is performed on the returned SpanConfig (e.g. no uniqueness // checking or bounding of data), it is left to the SDK to perform this // action. func NewSpanEndConfig(options ...SpanEndOption) SpanConfig { … } type SpanStartOption … type spanOptionFunc … func (fn spanOptionFunc) applySpanStart(cfg SpanConfig) SpanConfig { … } type SpanEndOption … type EventConfig … // Attributes describe the associated qualities of an Event. func (cfg *EventConfig) Attributes() []attribute.KeyValue { … } // Timestamp is a time in an Event life-cycle. func (cfg *EventConfig) Timestamp() time.Time { … } // StackTrace checks whether stack trace capturing is enabled. func (cfg *EventConfig) StackTrace() bool { … } // NewEventConfig applies all the EventOptions to a returned EventConfig. If no // timestamp option is passed, the returned EventConfig will have a Timestamp // set to the call time, otherwise no validation is performed on the returned // EventConfig. func NewEventConfig(options ...EventOption) EventConfig { … } type EventOption … type SpanOption … type SpanStartEventOption … type SpanEndEventOption … type attributeOption … func (o attributeOption) applySpan(c SpanConfig) SpanConfig { … } func (o attributeOption) applySpanStart(c SpanConfig) SpanConfig { … } func (o attributeOption) applyEvent(c EventConfig) EventConfig { … } var _ … // WithAttributes adds the attributes related to a span life-cycle event. // These attributes are used to describe the work a Span represents when this // option is provided to a Span's start or end events. Otherwise, these // attributes provide additional information about the event being recorded // (e.g. error, state change, processing progress, system event). // // If multiple of these options are passed the attributes of each successive // option will extend the attributes instead of overwriting. There is no // guarantee of uniqueness in the resulting attributes. func WithAttributes(attributes ...attribute.KeyValue) SpanStartEventOption { … } type SpanEventOption … type timestampOption … func (o timestampOption) applySpan(c SpanConfig) SpanConfig { … } func (o timestampOption) applySpanStart(c SpanConfig) SpanConfig { … } func (o timestampOption) applySpanEnd(c SpanConfig) SpanConfig { … } func (o timestampOption) applyEvent(c EventConfig) EventConfig { … } var _ … // WithTimestamp sets the time of a Span or Event life-cycle moment (e.g. // started, stopped, errored). func WithTimestamp(t time.Time) SpanEventOption { … } type stackTraceOption … func (o stackTraceOption) applyEvent(c EventConfig) EventConfig { … } func (o stackTraceOption) applySpan(c SpanConfig) SpanConfig { … } func (o stackTraceOption) applySpanEnd(c SpanConfig) SpanConfig { … } // WithStackTrace sets the flag to capture the error with stack trace (e.g. true, false). func WithStackTrace(b bool) SpanEndEventOption { … } // WithLinks adds links to a Span. The links are added to the existing Span // links, i.e. this does not overwrite. Links with invalid span context are ignored. func WithLinks(links ...Link) SpanStartOption { … } // WithNewRoot specifies that the Span should be treated as a root Span. Any // existing parent span context will be ignored when defining the Span's trace // identifiers. func WithNewRoot() SpanStartOption { … } // WithSpanKind sets the SpanKind of a Span. func WithSpanKind(kind SpanKind) SpanStartOption { … } // WithInstrumentationVersion sets the instrumentation version. func WithInstrumentationVersion(version string) TracerOption { … } // WithInstrumentationAttributes sets the instrumentation attributes. // // The passed attributes will be de-duplicated. func WithInstrumentationAttributes(attr ...attribute.KeyValue) TracerOption { … } // WithSchemaURL sets the schema URL for the Tracer. func WithSchemaURL(schemaURL string) TracerOption { … }