opentelemetry-cpp icon indicating copy to clipboard operation
opentelemetry-cpp copied to clipboard

Inconsistency between the use of std::shared_ptr and nostd::shared_ptr

Open malkia opened this issue 3 years ago • 3 comments

Describe your environment Windows, MSVC, Using 1.8.1 tag

Steps to reproduce Describe exactly how to reproduce the error. Include a code sample if applicable.

What is the expected behavior? More consitent use of either std::shared_ptr or nostd::shared_ptr (e.g. same way of using it with respect to api and sdk/etc.)

What is the actual behavior? Inconsistency where one class might return/deal with std:;shared_ptr along with nostd::shared_ptr

Additional context Not much, and not a blocker at all. I'm working on Windows C++ dll version and re-exposing some of (what I think) are missing factories (PeriodicExportingMetricFactory, MeterProviderFactory) such that I can have single "otel.dll" that is safe to call and work with.

Please compare this: https://github.com/open-telemetry/opentelemetry-cpp/blob/v1.8.1/sdk/include/opentelemetry/sdk/metrics/exemplar/filter.h#L35

With: https://github.com/open-telemetry/opentelemetry-cpp/blob/v1.8.1/sdk/include/opentelemetry/sdk/metrics/exemplar/reservoir.h#L53

(and other examples)

Also I'm compiling/forcing HAVE_CPP_STDLIB so for me it doesn't matter much, but in general might be good to have consitent way of which one should be used or not (TBH, I can't fully comprehend all edge cases here, so this might've been a valid choice after all)

malkia avatar Dec 20 '22 23:12 malkia

It's supposed to be nostd:: components at API interface, and std:: components at SDK interface. Thanks for raising the issue.

lalitb avatar Dec 21 '22 00:12 lalitb

This issue was marked as stale due to lack of activity.

github-actions[bot] avatar Mar 09 '23 02:03 github-actions[bot]

Is this still being worked on after the previous closed PR @bogdandrutu @malkia or is it something I take up

RichardChukwu avatar Oct 22 '24 13:10 RichardChukwu