forked from open-telemetry/opentelemetry-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Comply with OpenTelemetry attributes specification (open-telemetry#1703)
* Add Valid method to KeyValue * Use KeyValue.Valid in attribute add on Span * Resource StringDetector errors for invalid attribute * Ignore invalid attr in NewWithAttributes The OpenTelemetry specification requires attributes conform to a standard evaluated and returned by attribute.KeyValue.Valid. To comply with the specification, Resources created from NewWithAttributes need to only contain valid attributes. This adds a check to ensure this and drops invalid attributes passed as arguments. * Add changes to changelog * Add nolint comment The attribute.Set is (possibly overly) optimized to avoid allocations. The returned value from the constructor is a value of a Set, not a pointer to the Set. A Set contains a lock value and pointer methods so passing the Set value raises the copylock go vet error. This copies the same nolint comment from the `NewSet` method this used to use. * Apply suggestions from code review Co-authored-by: Sam Xie <[email protected]> Co-authored-by: Sam Xie <[email protected]>
- Loading branch information
Showing
8 changed files
with
138 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters