Skip to content

Ability to use Standard Library instead of opentelemetry nostd classes #67

@maxgolov

Description

@maxgolov

Due to ABI stability requirements OpenTelemetry C++ SDK provides the standard implementation of 'common' std-alike classes under nostd namespace:

  • function ref
  • shared_ptr
  • span
  • string_view
  • unique_ptr
  • variant

However, in some environments it may be of benefit to alias the nostd types to standard library, esp. if compiler has full support of C++17. And if the environment the SDK is being built for has no need to consume any external prebuilt exporters.

One way to achieve this is a custom compile-time build option (cmake flag) that aliases nostd with std namespace. Tests could be added to verify that the SDK still works well with recent version of Visual Studio, Apple llvm-clang, gcc, etc. (in essence, replacing the nostd implementations with std).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions