monitoring

package
v2.43.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2026 License: CC0-1.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginTrxFromContext added in v2.21.0

func BeginTrxFromContext(ctx context.Context) *newrelic.Transaction
func GetLogLink(traceId string) string

func GetTraceId added in v2.43.11

func GetTraceId(ctx context.Context) string

func Init added in v2.41.7

func Init()

func InitNewRelic

func InitNewRelic(opts ...NewRelicOpts) *newRelic

func InitOTelSDK added in v2.41.0

func InitOTelSDK(ctx context.Context, cfg OTelConfig) (*sdktrace.TracerProvider, error)

func IsOTelActive added in v2.41.0

func IsOTelActive() bool

func NewContext added in v2.21.0

func NewContext(parentCtx context.Context, txn *newrelic.Transaction) context.Context

func NewRelicHTTPMiddleware added in v2.43.11

func NewRelicHTTPMiddleware(app *newrelic.Application) func(http.Handler) http.Handler

func OTelHTTPMiddleware added in v2.41.0

func OTelHTTPMiddleware(serviceName string) func(http.Handler) http.Handler

func SetProvider added in v2.41.7

func SetProvider(p Provider)

Types

type NewRelicOpts

type NewRelicOpts func(relics *newRelic)

func WithAppName

func WithAppName(appName string) NewRelicOpts

func WithLicenseKey

func WithLicenseKey(licenseKey string) NewRelicOpts

type NewRelics

type NewRelics interface {
}

type OTelConfig added in v2.41.0

type OTelConfig struct {
	ServiceName    string
	ServiceVersion string
	Environment    string
}

type Provider added in v2.41.7

type Provider interface {
	StartSpan(ctx context.Context, name string) (context.Context, Span)
	GetTraceId(ctx context.Context) string
	GetLogLink(traceId string) string
}

func ActiveProvider added in v2.41.7

func ActiveProvider() Provider

type Span added in v2.41.7

type Span interface {
	End()
	SetAttributes(kv ...attribute.KeyValue)
}

func StartSpan added in v2.41.0

func StartSpan(ctx context.Context, name string) (context.Context, Span)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL