internal

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package internal contains an interface for detecting resource information, and a provider to merge the resources returned by a slice of custom detectors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEmptyResource

func IsEmptyResource(res pdata.Resource) bool

func MergeResource

func MergeResource(to, from pdata.Resource, overrideTo bool)

func NewAttributeMap

func NewAttributeMap(mp map[string]interface{}) pdata.AttributeMap

func NewResource

func NewResource(mp map[string]interface{}) pdata.Resource

Types

type Detector

type Detector interface {
	Detect(ctx context.Context) (pdata.Resource, error)
}

type DetectorType

type DetectorType string

type ResourceProvider

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

func NewResourceProvider

func NewResourceProvider(logger *zap.Logger, timeout time.Duration, detectors ...Detector) *ResourceProvider

func (*ResourceProvider) Get

type ResourceProviderFactory

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

func NewProviderFactory

func NewProviderFactory(detectors map[DetectorType]Detector) *ResourceProviderFactory

func (*ResourceProviderFactory) CreateResourceProvider

func (f *ResourceProviderFactory) CreateResourceProvider(logger *zap.Logger, timeout time.Duration, detectorTypes ...DetectorType) (*ResourceProvider, error)

Directories

Path Synopsis
Package env provides a detector that loads resource information from the OTEL_RESOURCE environment variable.
Package env provides a detector that loads resource information from the OTEL_RESOURCE environment variable.
gcp
gce
Package gce provides a detector that loads resource information from the GCE metatdata
Package gce provides a detector that loads resource information from the GCE metatdata

Jump to

Keyboard shortcuts

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