Skip to content

Commit

Permalink
Merge branch 'main' into ostream-metrics-exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Feb 19, 2022
2 parents 1555f55 + 3508d7c commit 99b8bcb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api/include/opentelemetry/context/runtime_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,18 @@ class RuntimeContext
GetStorage() = storage;
}

/**
* Provide a pointer to const runtime context storage.
*
* The returned pointer can only be used for extending the lifetime of the runtime context
* storage.
*
*/
static nostd::shared_ptr<const RuntimeContextStorage> GetConstRuntimeContextStorage() noexcept
{
return GetRuntimeContextStorage();
}

private:
static nostd::shared_ptr<RuntimeContextStorage> GetRuntimeContextStorage() noexcept
{
Expand Down

0 comments on commit 99b8bcb

Please sign in to comment.