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 ¶
- func ClientFromContext(ctx context.Context) (*http.Client, error)
- func ContextWithClient(ctx context.Context, client *http.Client) context.Context
- func IsEmptyResource(res pcommon.Resource) bool
- func MergeResource(to, from pcommon.Resource, overrideTo bool)
- func MergeSchemaURL(currentSchemaURL string, newSchemaURL string) string
- type Detector
- type DetectorConfig
- type DetectorFactory
- type DetectorType
- type ResourceDetectorConfig
- type ResourceProvider
- type ResourceProviderFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientFromContext ¶
ClientFromContext attempts to extract an *http.Client from the provided context.Context.
func ContextWithClient ¶
ContextWithClient returns a new context.Context with the provided *http.Client stored as a value.
func IsEmptyResource ¶
func MergeResource ¶
func MergeSchemaURL ¶
Types ¶
type DetectorConfig ¶
type DetectorConfig any
type DetectorFactory ¶
type DetectorFactory func(processor.Settings, DetectorConfig) (Detector, error)
type DetectorType ¶
type DetectorType string
type ResourceDetectorConfig ¶
type ResourceDetectorConfig interface {
GetConfigFromType(DetectorType) DetectorConfig
}
type ResourceProvider ¶
type ResourceProvider struct {
// contains filtered or unexported fields
}
func NewResourceProvider ¶
type ResourceProviderFactory ¶
type ResourceProviderFactory struct {
// contains filtered or unexported fields
}
func NewProviderFactory ¶
func NewProviderFactory(detectors map[DetectorType]DetectorFactory) *ResourceProviderFactory
func (*ResourceProviderFactory) CreateResourceProvider ¶
func (f *ResourceProviderFactory) CreateResourceProvider( params processor.Settings, timeout time.Duration, attributes []string, detectorConfigs ResourceDetectorConfig, detectorTypes ...DetectorType) (*ResourceProvider, error)
Directories ¶
Path | Synopsis |
---|---|
aws
|
|
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. |
Click to show internal directories.
Click to hide internal directories.