Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Trace] Add SpanData getter for Span Recordable #1508

Merged
merged 11 commits into from
Aug 2, 2022
10 changes: 9 additions & 1 deletion sdk/include/opentelemetry/sdk/trace/recordable.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace trace
{

using namespace opentelemetry::sdk::instrumentationlibrary;

class SpanData;
/**
* Maintains a representation of a span in a format that can be processed by a recorder.
*
Expand Down Expand Up @@ -146,6 +146,14 @@ class Recordable
*/
virtual void SetInstrumentationLibrary(
const InstrumentationLibrary &instrumentation_library) noexcept = 0;

/**
* Get the SpanData object for this Recordable.
*
* @return SpanData*
*/

virtual explicit operator SpanData *() const { return nullptr; }
};
} // namespace trace
} // namespace sdk
Expand Down