-
Notifications
You must be signed in to change notification settings - Fork 194
Remove old metrics and replace with StableMetrics #809
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
Conversation
d93f1b7
to
58bde17
Compare
…meterBuilder() method Resolved this by added a NoopStableMeterProviderBuilder that resolves to a StableMeterProviderBuilder once a reader is added.
97d4108
to
7932374
Compare
b39242a
to
da0dbc4
Compare
} | ||
|
||
public func encode(to encoder: any Encoder) throws { | ||
var container = try encoder.container(keyedBy: CodingKeys.self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't need a try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work, it has really take long getting here but you did it, congrats!!!
There is one thing I am not sure if should also be added or what are the drawback, just remove all the Stable from the name , eg StableMeterProviderSdk -> MeterProviderSdk and keep a type alias with the Stable prefix, like:
public typealias StableMeterProvider = MeterProvider
public protocol MeterProvider: AnyObject {
and
public typealias StableMeterProviderSdk = MeterProviderSdk
public class MeterProviderSdk: MeterProvider {
But it can also be done in a separate PR.
@nachoBonafonte I thought that might be too noisy to include in this PR--I was trying to make it a little easier to review. Next PR will remove the term Note: I want to do one more release before merging this PR |
@bryce-b Works for me!! |
This PR completely removes the old metrics and replaces the tests and various usages with StableMetrics
including:
Other details:
metrics/
except undermetrics/stable
)metrics/stable
have been moved up a level intometrics
PointData
child objects have been extended to supportcodable
to enable their use with Sources/Exporters/Persistence/PersistenceMetricExporterDecorator.swifthttps://github.com/open-telemetry/opentelemetry-swift/pull/809/files#diff-a45fa4ec76dac519209de328dcdaea417eb2cf599cbc9b4d35943e5356b4c62d
and
https://github.com/open-telemetry/opentelemetry-swift/pull/809/files#diff-fba1e960fca3f7ad1655e7754ebc8cf1c843a72d3e26620036c551a38311de66