Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace use of old term label with attribute #2790

Merged
merged 10 commits into from
Apr 18, 2022

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Apr 14, 2022

The specification has unified on the term attribute to describe key-value pairs. There exist still many hold-overs of the use of the term label. This updates those uses or deprecates exported types and functions in favor of renamed forms.


Changed

  • The WithLabelEncoder option from the go.opentelemetry.io/otel/exporters/stdout/stdoutmetric package is renamed to WithAttributeEncoder.
  • The Batch.Labels field from the go.opentelemetry.io/otel/sdk/metric/metrictest package is renamed to Batch.Attributes.
  • The LabelFilterSelector interface from go.opentelemetry.io/otel/sdk/metric/processor/reducer is renamed to AttributeFilterSelector. The method included in the renamed interface also changed from LabelFilterFor to AttributeFilterFor.
  • The Metadata.Labels method from the go.opentelemetry.io/otel/sdk/metric/export package is renamed to Metadata.Attributes. Consequentially, the Record type from the same package also has had the embedded method renamed.

Deprecated

  • The Iterator.Label method in the go.opentelemetry.io/otel/attribute package is deprecated. Use the equivalent Iterator.Attribute method instead.
  • The Iterator.IndexedLabel method in the go.opentelemetry.io/otel/attribute package is deprecated. Use the equivalent Iterator.IndexedAttribute method instead.
  • The MergeIterator.Label method in the go.opentelemetry.io/otel/attribute package is deprecated. Use the equivalent MergeIterator.Attribute method instead.

MrAlias and others added 4 commits April 14, 2022 11:31
The specification has unified on the term attribute to describe
key-value pairs. There exist still many hold-overs of the use of the
term label. This updates those uses or deprecates exported types and
functions in favor of renamed forms.
@codecov
Copy link

codecov bot commented Apr 15, 2022

Codecov Report

Merging #2790 (1e4b87b) into main (1884de2) will increase coverage by 0.0%.
The diff coverage is 75.1%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2790   +/-   ##
=====================================
  Coverage   75.7%   75.7%           
=====================================
  Files        178     178           
  Lines      11703   11707    +4     
=====================================
+ Hits        8864    8868    +4     
  Misses      2614    2614           
  Partials     225     225           
Impacted Files Coverage Δ
...rs/otlp/otlpmetric/internal/otlpmetrictest/data.go 0.0% <0.0%> (ø)
...tlp/otlpmetric/internal/otlpmetrictest/otlptest.go 0.0% <0.0%> (ø)
sdk/metric/aggregator/lastvalue/lastvalue.go 87.7% <ø> (ø)
sdk/metric/metrictest/meter.go 100.0% <ø> (ø)
sdk/metric/processor/basic/config.go 100.0% <ø> (ø)
sdk/metric/sdkapi/noop.go 72.7% <0.0%> (ø)
sdk/metric/sdkapi/sdkapi.go 100.0% <ø> (ø)
bridge/opentracing/bridge.go 43.6% <33.3%> (ø)
exporters/stdout/stdoutmetric/config.go 84.3% <50.0%> (ø)
exporters/prometheus/prometheus.go 65.0% <74.0%> (ø)
... and 15 more

bridge/opencensus/exporter.go Outdated Show resolved Hide resolved
Copy link
Member

@XSAM XSAM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@MrAlias MrAlias merged commit a8ea3db into open-telemetry:main Apr 18, 2022
@MrAlias MrAlias deleted the label2attr branch April 18, 2022 14:31
@MrAlias MrAlias added this to the Release v1.7.0 milestone Apr 25, 2022
@MrAlias MrAlias mentioned this pull request Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants