dd-trace-go.v1: gopkg.in/DataDog/dd-trace-go.v1/contrib/globalsign/mgo Index | Files

package mgo

import "gopkg.in/DataDog/dd-trace-go.v1/contrib/globalsign/mgo"

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

Index

Package Files

collection.go mgo.go option.go pipe.go query.go

type Bulk Uses

type Bulk struct {
    *mgo.Bulk
    // contains filtered or unexported fields
}

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

func (*Bulk) Run Uses

func (b *Bulk) Run() (result *mgo.BulkResult, err error)

Run invokes and traces Bulk.Run

type Collection Uses

type Collection struct {
    *mgo.Collection
    // contains filtered or unexported fields
}

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

func (*Collection) Bulk Uses

func (c *Collection) Bulk() *Bulk

Bulk creates a trace ready wrapper around Collection.Bulk

func (*Collection) Count Uses

func (c *Collection) Count() (n int, err error)

Count invokes and traces Collection.Count

func (*Collection) Create Uses

func (c *Collection) Create(info *mgo.CollectionInfo) error

Create invokes and traces Collection.Create

func (*Collection) DropCollection Uses

func (c *Collection) DropCollection() error

DropCollection invokes and traces Collection.DropCollection

func (*Collection) DropIndex Uses

func (c *Collection) DropIndex(key ...string) error

DropIndex invokes and traces Collection.DropIndex

func (*Collection) DropIndexName Uses

func (c *Collection) DropIndexName(name string) error

DropIndexName invokes and traces Collection.DropIndexName

func (*Collection) EnsureIndex Uses

func (c *Collection) EnsureIndex(index mgo.Index) error

EnsureIndex invokes and traces Collection.EnsureIndex

func (*Collection) EnsureIndexKey Uses

func (c *Collection) EnsureIndexKey(key ...string) error

EnsureIndexKey invokes and traces Collection.EnsureIndexKey

func (*Collection) Find Uses

func (c *Collection) Find(query interface{}) *Query

Find invokes and traces Collection.Find

func (*Collection) FindId Uses

func (c *Collection) FindId(id interface{}) *Query

FindId invokes and traces Collection.FindId

func (*Collection) Indexes Uses

func (c *Collection) Indexes() (indexes []mgo.Index, err error)

Indexes invokes and traces Collection.Indexes

func (*Collection) Insert Uses

func (c *Collection) Insert(docs ...interface{}) error

Insert invokes and traces Collectin.Insert

func (*Collection) NewIter Uses

func (c *Collection) NewIter(session *mgo.Session, firstBatch []bson.Raw, cursorId int64, err error) *Iter

NewIter invokes and traces Collection.Iter

func (*Collection) Pipe Uses

func (c *Collection) Pipe(pipeline interface{}) *Pipe

Pipe invokes and traces Collection.Pipe

func (*Collection) Remove Uses

func (c *Collection) Remove(selector interface{}) error

Remove invokes and traces Collection.Remove

func (*Collection) RemoveAll Uses

func (c *Collection) RemoveAll(selector interface{}) (info *mgo.ChangeInfo, err error)

RemoveAll invokes and traces Collection.RemoveAll

func (*Collection) RemoveId Uses

func (c *Collection) RemoveId(id interface{}) error

RemoveId invokes and traces Collection.RemoveId

func (*Collection) Repair Uses

func (c *Collection) Repair() *Iter

Repair invokes and traces Collection.Repair

func (*Collection) Update Uses

func (c *Collection) Update(selector interface{}, update interface{}) error

Update invokes and traces Collection.Update

func (*Collection) UpdateAll Uses

func (c *Collection) UpdateAll(selector interface{}, update interface{}) (info *mgo.ChangeInfo, err error)

UpdateAll invokes and traces Collection.UpdateAll

func (*Collection) UpdateId Uses

func (c *Collection) UpdateId(id interface{}, update interface{}) error

UpdateId invokes and traces Collection.UpdateId

func (*Collection) Upsert Uses

func (c *Collection) Upsert(selector interface{}, update interface{}) (info *mgo.ChangeInfo, err error)

Upsert invokes and traces Collection.Upsert

func (*Collection) UpsertId Uses

func (c *Collection) UpsertId(id interface{}, update interface{}) (info *mgo.ChangeInfo, err error)

UpsertId invokes and traces Collection.UpsertId

type Database Uses

type Database struct {
    *mgo.Database
    // contains filtered or unexported fields
}

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

func (*Database) C Uses

func (db *Database) C(name string) *Collection

C returns a new Collection from this Database.

type DialOption Uses

type DialOption func(*mongoConfig)

DialOption represents an option that can be passed to Dial

func WithAnalytics Uses

func WithAnalytics(on bool) DialOption

WithAnalytics enables Trace Analytics for all started spans.

func WithAnalyticsRate Uses

func WithAnalyticsRate(rate float64) DialOption

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

func WithContext Uses

func WithContext(ctx context.Context) DialOption

WithContext sets the context.

func WithServiceName Uses

func WithServiceName(name string) DialOption

WithServiceName sets the service name for a given MongoDB context.

type Iter Uses

type Iter struct {
    *mgo.Iter
    // contains filtered or unexported fields
}

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

func (*Iter) All Uses

func (iter *Iter) All(result interface{}) (err error)

All invokes and traces Iter.All

func (*Iter) Close Uses

func (iter *Iter) Close() (err error)

Close invokes and traces Iter.Close

func (*Iter) For Uses

func (iter *Iter) For(result interface{}, f func() error) (err error)

For invokes and traces Iter.For

func (*Iter) Next Uses

func (iter *Iter) Next(result interface{}) bool

Next invokes and traces Iter.Next

type Pipe Uses

type Pipe struct {
    *mgo.Pipe
    // contains filtered or unexported fields
}

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

func (*Pipe) All Uses

func (p *Pipe) All(result interface{}) error

All invokes and traces Pipe.All

func (*Pipe) Explain Uses

func (p *Pipe) Explain(result interface{}) (err error)

Explain invokes and traces Pipe.Explain

func (*Pipe) Iter Uses

func (p *Pipe) Iter() *Iter

Iter invokes and traces Pipe.Iter

func (*Pipe) One Uses

func (p *Pipe) One(result interface{}) (err error)

One invokes and traces Pipe.One

type Query Uses

type Query struct {
    *mgo.Query
    // contains filtered or unexported fields
}

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

func (*Query) All Uses

func (q *Query) All(result interface{}) error

All invokes and traces Query.All

func (*Query) Apply Uses

func (q *Query) Apply(change mgo.Change, result interface{}) (info *mgo.ChangeInfo, err error)

Apply invokes and traces Query.Apply

func (*Query) Count Uses

func (q *Query) Count() (n int, err error)

Count invokes and traces Query.Count

func (*Query) Distinct Uses

func (q *Query) Distinct(key string, result interface{}) error

Distinct invokes and traces Query.Distinct

func (*Query) Explain Uses

func (q *Query) Explain(result interface{}) error

Explain invokes and traces Query.Explain

func (*Query) For Uses

func (q *Query) For(result interface{}, f func() error) error

For invokes and traces Query.For

func (*Query) Iter Uses

func (q *Query) Iter() *Iter

Iter invokes and traces Query.Iter

func (*Query) MapReduce Uses

func (q *Query) MapReduce(job *mgo.MapReduce, result interface{}) (info *mgo.MapReduceInfo, err error)

MapReduce invokes and traces Query.MapReduce

func (*Query) One Uses

func (q *Query) One(result interface{}) error

One invokes and traces Query.One

func (*Query) Tail Uses

func (q *Query) Tail(timeout time.Duration) *Iter

Tail invokes and traces Query.Tail

type Session Uses

type Session struct {
    *mgo.Session
    // contains filtered or unexported fields
}

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

func Dial Uses

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

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

func (*Session) DB Uses

func (s *Session) DB(name string) *Database

DB returns a new database for this Session.

func (*Session) Run Uses

func (s *Session) Run(cmd interface{}, result interface{}) (err error)

Run invokes and traces Session.Run

Package mgo imports 10 packages (graph). Updated 2020-08-07. Refresh now. Tools for package owners.