Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorSelector ¶ added in v0.10.0
ErrorSelector is a predicate that the error should be recorded.
The span records only errors that the function returns true. If the function returns false against all of the errors in the gqlgen response, the span status will be Unset instead of Error.
type Option ¶
type Option func(c *config)
func TraceStructFields ¶ added in v0.2.0
TraceStructFields creates an Option that enforces Tracer to struct fields resolver.
default value: false The false means the Tracer only traces the resolvers runs against struct methods or resolver methods.
func WithComplexityLimitExtensionName ¶
WithComplexityLimitExtensionName creates an Option that tells Tracer to get complexity stats calculated by the extension identified by the given name.
func WithErrorSelector ¶ added in v0.10.0
func WithErrorSelector(fn ErrorSelector) Option
WithErrorSelector creates an Option that tells Tracer uses the given selector.
func WithTracerProvider ¶
func WithTracerProvider(tp trace.TracerProvider) Option
WithTracerProvider creates an Optoin that tells Tracer to use given TracerProvider.
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
Tracer is a gqlgen extension to collect traces from the resolver.