-
Notifications
You must be signed in to change notification settings - Fork 647
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
Duplicate meter handling in SDK #2141
Comments
I am experimenting with the alpha release of the library on a personal project, exporting to Google Cloud Monitoring. I think it would be more intuitive for the API to return the same meter. Conceptually, it just seems to me that the meter acts like a global object and I don't actually need more than one copy of it to create the multiple counters I have in different files. |
I agree, I think that approach is also solves the problem of duplicate instruments (#2142) |
Ok, I think we can implement as @mpomarole suggests, the spec allows it IIUC: It is unspecified whether or under which conditions the same or different Meter instances are returned from this functions. |
Isn't there still the issue for identifying what denotes an instrument as unique? For example, with the same meter, if we were to create two counters with the same name, unit and description(?)? |
Changing this to be an implementation in the SDK instead of the API. This behavior is not defined in the API spec and seems to be a specific implementation detail. It will also be much cleaner (since InstrumentationInfo is in the sdk) and we don't have to deal with proxies in the api. |
should we return the same meter or new meter when get_meter() is called with the same params?
The text was updated successfully, but these errors were encountered: