recipes

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractLocalImportName

func ExtractLocalImportName(impPath string) string

ExtractLocalImportName returns last part of the import path ignoring a version suffix

func GetPackageImportName

func GetPackageImportName(fset *token.FileSet, f *ast.File, importPath string) (string, error)

GetPackageImportName extracts from the imports name of the import

Types

type AWSSDK

type AWSSDK struct {
	InstanaPkg string
	// contains filtered or unexported fields
}

AWSSDK instruments github.com/aws/aws-sdk-go/aws/session package with Instana

func NewAWSSDK

func NewAWSSDK() *AWSSDK

NewAWSSDK returns AWSSDK recipe

func (*AWSSDK) ImportPath

func (recipe *AWSSDK) ImportPath() string

ImportPath returns instrumentation import path

func (*AWSSDK) Instrument

func (recipe *AWSSDK) Instrument(fset *token.FileSet, f ast.Node, targetPkg, sensorVar string) (changed bool)

Instrument applies recipe to the ast Node

type DatabaseSQL

type DatabaseSQL struct {
	InstanaPkg string
	// contains filtered or unexported fields
}

DatabaseSQL instruments database/sql package with Instana

func NewDatabaseSQL

func NewDatabaseSQL() *DatabaseSQL

func (*DatabaseSQL) ImportPath

func (recipe *DatabaseSQL) ImportPath() string

ImportPath returns instrumentation import path

func (*DatabaseSQL) Instrument

func (recipe *DatabaseSQL) Instrument(fset *token.FileSet, node ast.Node, targetPkg, sensorVar string) (changed bool)

Instrument instruments sql.Open()

type Echo

type Echo struct {
	InstanaPkg string
	// contains filtered or unexported fields
}

Echo instruments github.com/labstack/echo/v4 package with Instana

func NewEcho

func NewEcho() *Echo

func (*Echo) ImportPath

func (recipe *Echo) ImportPath() string

ImportPath returns instrumentation import path

func (*Echo) Instrument

func (recipe *Echo) Instrument(fset *token.FileSet, f ast.Node, targetPkg, sensorVar string) bool

Instrument applies recipe to the ast Node

type GRPC

type GRPC struct {
	InstanaPkg string
}

GRPC instruments google.golang.org/grpc package with Instana

func NewGRPC

func NewGRPC() *GRPC

func (*GRPC) ImportPath

func (recipe *GRPC) ImportPath() string

ImportPath returns instrumentation import path

func (*GRPC) Instrument

func (recipe *GRPC) Instrument(fset *token.FileSet, f ast.Node, targetPkg, sensorVar string) (changed bool)

type Gin

type Gin struct {
	InstanaPkg string
	// contains filtered or unexported fields
}

Gin instruments github.com/labstack/gin/v4 package with Instana

func NewGin

func NewGin() *Gin

NewGin returns Gin recipe

func (*Gin) ImportPath

func (recipe *Gin) ImportPath() string

ImportPath returns instrumentation import path

func (*Gin) Instrument

func (recipe *Gin) Instrument(fset *token.FileSet, f ast.Node, targetPkg, sensorVar string) bool

Instrument applies recipe to the ast Node

type HttpRouter

type HttpRouter struct {
	InstanaPkg string
}

HttpRouter instruments the github.com/julienschmidt/httprouter package with Instana

func NewHttpRouter

func NewHttpRouter() *HttpRouter

NewHttpRouter returns the HttpRouter recipe

func (*HttpRouter) ImportPath

func (recipe *HttpRouter) ImportPath() string

ImportPath returns the instrumentation import path

func (*HttpRouter) Instrument

func (recipe *HttpRouter) Instrument(fset *token.FileSet, f ast.Node, targetPkg, sensorVar string) (changed bool)

Instrument applies the recipe to the ast Node

type Lambda

type Lambda struct {
	InstanaPkg string
}

Lambda instruments github.com/aws/aws-lambda-go package with Instana

func NewLambda

func NewLambda() *Lambda

func (*Lambda) ImportPath

func (recipe *Lambda) ImportPath() string

ImportPath returns instrumentation import path

func (*Lambda) Instrument

func (recipe *Lambda) Instrument(fset *token.FileSet, f ast.Node, targetPkg, sensorVar string) (changed bool)

type Mongo

type Mongo struct {
	InstanaPkg string
	// contains filtered or unexported fields
}

Mongo instruments go.mongodb.org/mongo-driver/mongo package with Instana

func NewMongo

func NewMongo() *Mongo

func (*Mongo) ImportPath

func (recipe *Mongo) ImportPath() string

ImportPath returns instrumentation import path

func (*Mongo) Instrument

func (recipe *Mongo) Instrument(fset *token.FileSet, f ast.Node, targetPkg, sensorVar string) (changed bool)

Instrument applies recipe to the ast Node

type Mux

type Mux struct {
	InstanaPkg string
	// contains filtered or unexported fields
}

Mux instruments github.com/gorilla/mux package with Instana

func NewMux

func NewMux() *Mux

NewMux returns Mux recipe

func (*Mux) ImportPath

func (recipe *Mux) ImportPath() string

ImportPath returns instrumentation import path

func (*Mux) Instrument

func (recipe *Mux) Instrument(fset *token.FileSet, f ast.Node, targetPkg, sensorVar string) (changed bool)

Instrument applies recipe to the ast Node

type NetHTTP

type NetHTTP struct {
	InstanaPkg string
}

NetHTTP instruments net/http package with Instana

func NewNetHTTP

func NewNetHTTP() *NetHTTP

func (*NetHTTP) ImportPath

func (recipe *NetHTTP) ImportPath() string

ImportPath returns instrumentation import path

func (*NetHTTP) Instrument

func (recipe *NetHTTP) Instrument(fset *token.FileSet, node ast.Node, targetPkg, sensorVar string) (changed bool)

Instrument instruments net/http.HandleFunc and net/http.Handle calls as well as (http.Client).Transport

type Sarama

type Sarama struct {
	InstanaPkg string
	// contains filtered or unexported fields
}

Sarama instruments github.com/Shopify/sarama package with Instana

func NewSarama

func NewSarama() *Sarama

NewSarama returns Sarama recipe

func (*Sarama) ImportPath

func (recipe *Sarama) ImportPath() string

ImportPath returns instrumentation import path

func (*Sarama) Instrument

func (recipe *Sarama) Instrument(fset *token.FileSet, f ast.Node, targetPkg, sensorVar string) (changed bool)

Instrument applies recipe to the ast Node

Jump to

Keyboard shortcuts

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