mgo

package
v1.999.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package mgo provides functions and types which allow tracing of the MGO MongoDB client (https://github.com/globalsign/mgo)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bulk

type Bulk = v2.Bulk

Bulk is an mgo.Bulk instance that will be traced.

type Collection

type Collection = v2.Collection

Collection provides a mgo.Collection along with data used for APM Tracing.

type Database

type Database = v2.Database

Database is an mgo.Database along with the data necessary for tracing.

type DialOption

type DialOption = v2.DialOption

DialOption represents an option that can be passed to Dial

func WithAnalytics added in v1.11.0

func WithAnalytics(on bool) DialOption

WithAnalytics enables Trace Analytics for all started spans.

func WithAnalyticsRate added in v1.11.0

func WithAnalyticsRate(rate float64) DialOption

WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.

func WithContext

func WithContext(ctx context.Context) DialOption

WithContext sets the context.

func WithServiceName

func WithServiceName(name string) DialOption

WithServiceName sets the service name for a given MongoDB context.

type Iter

type Iter = v2.Iter

Iter is an mgo.Iter instance that will be traced.

type Pipe

type Pipe = v2.Pipe

Pipe is an mgo.Pipe instance along with the data necessary for tracing.

type Query

type Query = v2.Query

Query is an mgo.Query instance along with the data necessary for tracing.

type Session

type Session = v2.Session

Session is an mgo.Session instance that will be traced.

func Dial

func Dial(url string, opts ...DialOption) (*Session, error)

Dial opens a connection to a MongoDB server and configures it for tracing.

Jump to

Keyboard shortcuts

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