otelresty

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

This package implements integration between the go-resty (https://github.com/go-resty/resty) library and OpenTelemetry.

import "github.com/americanas-go/ignite/go-resty/resty.v2/plugins/contrib/dubonzi/otelresty.v1"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func Register

func Register(ctx context.Context, client *resty.Client) error

Register registers the Opentelemetry integration with the provided resty client. It is a shorthand for NewOtelresty().Register().

Types

type Options

type Options struct {
	Enabled        bool
	TracerName     string
	TracingOptions []dubresty.Option
}

func NewOptions

func NewOptions(tracingOptions ...dubresty.Option) (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string, tracingOptions ...dubresty.Option) (opts *Options, err error)

NewOptionsWithPath unmarshals options based a given key path.

type Otelresty

type Otelresty struct {
	// contains filtered or unexported fields
}

Otelresty represents the Opentelemetry integration for resty.

func NewOtelresty

func NewOtelresty(tracingOptions ...dubresty.Option) *Otelresty

NewOtelresty returns a new Otelresty with default options.

func NewOtelrestyWithConfigPath

func NewOtelrestyWithConfigPath(path string, tracingOptions ...dubresty.Option) (*Otelresty, error)

NewOtelrestyWithConfigPath returns a new Otelresty with options from the provided path.

func NewOtelrestyWithOptions

func NewOtelrestyWithOptions(options *Options) *Otelresty

NewOtelresty returns a new Otelresty with default options.

func (*Otelresty) Register

func (o *Otelresty) Register(ctx context.Context, client *resty.Client) error

Jump to

Keyboard shortcuts

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