# README

SDK Resource

PkgGoDev

# Functions

Default returns an instance of Resource with a default "service.name" and OpenTelemetrySDK attributes.
Detect returns a new [Resource] merged from all the Resources each of the detectors produces.
Empty returns an instance of Resource with no attributes.
Environment returns an instance of Resource with attributes extracted from the OTEL_RESOURCE_ATTRIBUTES environment variable.
Merge creates a new [Resource] by merging a and b.
New returns a [Resource] built using opts.
NewSchemaless creates a resource from attrs.
NewWithAttributes creates a resource from attrs and associates the resource with a schema URL.
StringDetector returns a Detector that will produce a *Resource containing the string as a value corresponding to k.
WithAttributes adds attributes to the configured Resource.
WithContainer adds all the Container attributes to the configured Resource.
WithContainerID adds an attribute with the id of the container to the configured Resource.
WithDetectors adds detectors to be evaluated for the configured resource.
WithFromEnv adds attributes from environment variables to the configured resource.
WithHost adds attributes from the host to the configured resource.
WithHostID adds host ID information to the configured resource.
WithOS adds all the OS attributes to the configured Resource.
WithOSDescription adds an attribute with the operating system description to the configured Resource.
WithOSType adds an attribute with the operating system type to the configured Resource.
WithProcess adds all the Process attributes to the configured Resource.
WithProcessCommandArgs adds an attribute with all the command arguments (including the command/executable itself) as received by the process to the configured Resource.
WithProcessExecutableName adds an attribute with the name of the process executable to the configured Resource.
WithProcessExecutablePath adds an attribute with the full path to the process executable to the configured Resource.
WithProcessOwner adds an attribute with the username of the user that owns the process to the configured Resource.
WithProcessPID adds an attribute with the process identifier (PID) to the configured Resource.
WithProcessRuntimeDescription adds an attribute with an additional description about the runtime of the process to the configured Resource.
WithProcessRuntimeName adds an attribute with the name of the runtime of this process to the configured Resource.
WithProcessRuntimeVersion adds an attribute with the version of the runtime of this process to the configured Resource.
WithSchemaURL sets the schema URL for the configured resource.
WithTelemetrySDK adds TelemetrySDK version info to the configured resource.

# Variables

ErrPartialResource is returned by a detector when complete source information for a Resource is unavailable or the source information contains invalid values that are omitted from the returned Resource.
ErrSchemaURLConflict is an error returned when two Resources are merged together that contain different, non-empty, schema URLs.

# Structs

Resource describes an entity about which identifying information and metadata is exposed.

# Interfaces

Detector detects OpenTelemetry resource information.
Option is the interface that applies a configuration option.