-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Deprecate the syncint64/syncfloat64/asyncint64/asyncfloat64 packages #3575
Merged
MrAlias
merged 6 commits into
open-telemetry:main
from
MrAlias:flatten-sync-async-metric
Jan 10, 2023
Merged
Deprecate the syncint64/syncfloat64/asyncint64/asyncfloat64 packages #3575
MrAlias
merged 6 commits into
open-telemetry:main
from
MrAlias:flatten-sync-async-metric
Jan 10, 2023
Conversation
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
MrAlias
requested review from
jmacd,
Aneurysm9,
evantorrie,
XSAM,
dashpole,
MadVikingGod,
pellared,
hanyuancheung and
dmathieu
as code owners
January 6, 2023 19:54
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3575 +/- ##
=====================================
Coverage 78.8% 78.8%
=====================================
Files 169 169
Lines 12437 12437
=====================================
Hits 9811 9811
Misses 2417 2417
Partials 209 209
|
dashpole
approved these changes
Jan 10, 2023
jmacd
approved these changes
Jan 10, 2023
jefferbrecht
added a commit
to GoogleCloudPlatform/ops-agent
that referenced
this pull request
Jan 30, 2023
9 tasks
jefferbrecht
added a commit
to GoogleCloudPlatform/ops-agent
that referenced
this pull request
Jan 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Flatten the instruments from the
go.opentelemetry.io/otel/metric/instrument/{syncint64,syncfloat64,asyncint64,asyncfloat64}
packages intogo.opentelemetry.io/otel/metric/instrument
.Follow up to #3507 (comment)
Why Flatten?
Our design choice to partition instrument names was made a while ago, why now flatten these packages?
The general reason is our recent API redesign work12 has made this partitioned package structure not fit with naming and code grouping design. It has become a relic of the prior, non-specification-compliant, design.
Match Specification Recommended Names
Fixes #3453
Our old design used the asynchronous and synchronous terms to identify instrument. The specification has specific naming recommendations for asynchronous instruments though. They should use the "Obervable" term instead. This was fixed in on the meter2, but by flattening the package structure the instrument names are also brought into compliance with the specification naming recommendation.
Unify instruments in instrument package
Each of the
go.opentelemetry.io/otel/metric/instrument/{syncint64,syncfloat64,asyncint64,asyncfloat64}
packages was a wrapper around 3 instrument types each. Thego.opentelemetry.io/otel/metric/instrument
package provided configuration and common embedded types for the other packages. This mean that the provided instrument functionality was spread across 5 different packages. By flattening into theinstrument
package all instrument functionality is provided by 1 unified package.Configuration is flattened, instruments were not
Instrument configuration is already split in the instrument package1 for each instrument type. Having the configuration for an instrument live in a separate package and not having those instruments split the same way in the same package creates an unneeded package boundary. Users looking at documentation about how an instrument is configured or implementing the configuration of an instrument need to look or import separate packages. This goes against the common Go idea of keeping related things close.
Deprecate instead of remove
To prevent adding the
go.opentelemetry.io/otel/metric/instrument/{syncint64,syncfloat64,asyncint64,asyncfloat64}
packages to our abandoned packages pile, this deprecates the packages and expects them to be removed in the next release.Footnotes
https://github.com/open-telemetry/opentelemetry-go/pull/3507 ↩ ↩2
https://github.com/open-telemetry/opentelemetry-go/pull/3530 ↩ ↩2