Skip to content

[Metrics API/SDK] Change Meter API/SDK to return nostd::unique_ptr for Sync Instruments #1700

@lalitb

Description

@lalitb

The Sync Instruments created through Meter API are not used internally within SDK. So it would be good to return nostd::unique_ptr for them. Changes are required in API and SDK for

  • Counter ( UINT64 and Double)
  • Histogram ( UINT64 and Double)
  • UpDownCounter ( INT64 and Double)

The Async Instruments can continue to return nostd::shared_ptr.
As part of this or separate PR, we can also maintain the shared_ptr of Async Instrument (instead of current raw pointer) in Observable Registry

opentelemetry::metrics::ObservableInstrument *instrument;

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions