You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a change I would like to submit for the Metrics SDK that does not directly address any SDK or API-level specification. What it will do is enable us to use the OTel-Go metrics SDK as part of an OTel-Collector processing pipeline.
The problem being solved is that the SDK expects each instrument used by the API to be registered once, statically. It expects that each instrument will have a unique registration, too. To use the SDK in a different context, where it is possible that multiple descriptors for the same name exist and where instruments are not long lived, requires support for "transient descriptors".
This re-uses the "refcount_mapped.go" support use to manage synchronous records for managing instruments. This code allows the OTel-Go SDK to be used in an environment where multiple descriptors with the same-name exist, and it will avoid leaking memory over time as these descriptors come and go. This also allows the OTel-Go SDK to be re-used as the implementation for other metric APIs with different instrument-lifecycle requirements than OTel, e.g., statsd libraries that do not require instrument registration.
The text was updated successfully, but these errors were encountered:
There is a change I would like to submit for the Metrics SDK that does not directly address any SDK or API-level specification. What it will do is enable us to use the OTel-Go metrics SDK as part of an OTel-Collector processing pipeline.
The problem being solved is that the SDK expects each instrument used by the API to be registered once, statically. It expects that each instrument will have a unique registration, too. To use the SDK in a different context, where it is possible that multiple descriptors for the same name exist and where instruments are not long lived, requires support for "transient descriptors".
I have prototyped this code here:
jmacd#59
This re-uses the "refcount_mapped.go" support use to manage synchronous records for managing instruments. This code allows the OTel-Go SDK to be used in an environment where multiple descriptors with the same-name exist, and it will avoid leaking memory over time as these descriptors come and go. This also allows the OTel-Go SDK to be re-used as the implementation for other metric APIs with different instrument-lifecycle requirements than OTel, e.g., statsd libraries that do not require instrument registration.
The text was updated successfully, but these errors were encountered: