Fix typos in resource.go. (#2201)
* Fix typos in resource.go. * Add a line to CHANGELOG.md with an identifier for the relevant PR. Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
This commit is contained in:
parent
abf6afe00e
commit
c0c5ef65eb
|
|
@ -44,6 +44,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
- The `"go.opentelemetry.io/otel/attribute".Any` function now supports `int32` values. (#2169)
|
- The `"go.opentelemetry.io/otel/attribute".Any` function now supports `int32` values. (#2169)
|
||||||
- Multiple calls to `"go.opentelemetry.io/otel/sdk/metric/controller/basic".WithResource()` are handled correctly, and when no resources are provided `"go.opentelemetry.io/otel/sdk/resource".Default()` is used. (#2120)
|
- Multiple calls to `"go.opentelemetry.io/otel/sdk/metric/controller/basic".WithResource()` are handled correctly, and when no resources are provided `"go.opentelemetry.io/otel/sdk/resource".Default()` is used. (#2120)
|
||||||
- The `WithoutTimestamps` option for the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter causes the exporter to correctly ommit timestamps. (#2195)
|
- The `WithoutTimestamps` option for the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter causes the exporter to correctly ommit timestamps. (#2195)
|
||||||
|
- Fixed typos in resources.go. (#2201)
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ func (r *Resource) SchemaURL() string {
|
||||||
return r.schemaURL
|
return r.schemaURL
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iter returns an interator of the Resource attributes.
|
// Iter returns an iterator of the Resource attributes.
|
||||||
// This is ideal to use if you do not want a copy of the attributes.
|
// This is ideal to use if you do not want a copy of the attributes.
|
||||||
func (r *Resource) Iter() attribute.Iterator {
|
func (r *Resource) Iter() attribute.Iterator {
|
||||||
if r == nil {
|
if r == nil {
|
||||||
|
|
@ -199,14 +199,14 @@ func Merge(a, b *Resource) (*Resource, error) {
|
||||||
return merged, nil
|
return merged, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Empty returns an instance of Resource with no attributes. It is
|
// Empty returns an instance of Resource with no attributes. It is
|
||||||
// equivalent to a `nil` Resource.
|
// equivalent to a `nil` Resource.
|
||||||
func Empty() *Resource {
|
func Empty() *Resource {
|
||||||
return &emptyResource
|
return &emptyResource
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default returns an instance of Resource with a default
|
// Default returns an instance of Resource with a default
|
||||||
// "service.name" and OpenTelemetrySDK attributes
|
// "service.name" and OpenTelemetrySDK attributes.
|
||||||
func Default() *Resource {
|
func Default() *Resource {
|
||||||
return defaultResource
|
return defaultResource
|
||||||
}
|
}
|
||||||
|
|
@ -223,13 +223,13 @@ func Environment() *Resource {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Equivalent returns an object that can be compared for equality
|
// Equivalent returns an object that can be compared for equality
|
||||||
// between two resources. This value is suitable for use as a key in
|
// between two resources. This value is suitable for use as a key in
|
||||||
// a map.
|
// a map.
|
||||||
func (r *Resource) Equivalent() attribute.Distinct {
|
func (r *Resource) Equivalent() attribute.Distinct {
|
||||||
return r.Set().Equivalent()
|
return r.Set().Equivalent()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set returns the equivalent *attribute.Set of this resources attributes.
|
// Set returns the equivalent *attribute.Set of this resource's attributes.
|
||||||
func (r *Resource) Set() *attribute.Set {
|
func (r *Resource) Set() *attribute.Set {
|
||||||
if r == nil {
|
if r == nil {
|
||||||
r = Empty()
|
r = Empty()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue