diff --git a/sdk/include/opentelemetry/sdk/trace/processor.h b/sdk/include/opentelemetry/sdk/trace/processor.h index 3c0870a036..15b42667a4 100644 --- a/sdk/include/opentelemetry/sdk/trace/processor.h +++ b/sdk/include/opentelemetry/sdk/trace/processor.h @@ -1,8 +1,7 @@ #pragma once -#include "opentelemetry/nostd/shared_ptr.h" -#include "opentelemetry/nostd/span.h" -#include "opentelemetry/sdk/trace/span_data.h" +#include +#include "opentelemetry/sdk/trace/recordable.h" #include "opentelemetry/trace/span.h" OPENTELEMETRY_BEGIN_NAMESPACE @@ -26,13 +25,14 @@ class SpanProcessor // OnEnd is called when a span is ended. virtual void OnEnd( - nostd::shared_ptr &recordable) noexcept = 0; + std::shared_ptr &recordable) noexcept = 0; // Export all ended spans that have not yet been exported. // // Optionally a timeout can be specified. The default timeout of 0 means that // no timeout is applied. - virtual void ForceFlush(uint64_t timeout_ms = 0) noexcept = 0; + virtual void ForceFlush( + std::chrono::microseconds timeout = std::chrono::microseconds(0)) noexcept = 0; // Shut down the processor and do any cleanup required. virtual void Shutdown() noexcept = 0; diff --git a/sdk/include/opentelemetry/sdk/trace/span_data.h b/sdk/include/opentelemetry/sdk/trace/span_data.h index f6293dacbf..bcf97ab230 100644 --- a/sdk/include/opentelemetry/sdk/trace/span_data.h +++ b/sdk/include/opentelemetry/sdk/trace/span_data.h @@ -19,25 +19,25 @@ class SpanData final : public Recordable { public: // The trace id for this span. - virtual opentelemetry::trace::TraceId GetTraceId() const noexcept = 0; + opentelemetry::trace::TraceId GetTraceId() const noexcept = 0; // The span id for this span. - virtual opentelemetry::trace::SpanId GetSpanId() const noexcept = 0; + opentelemetry::trace::SpanId GetSpanId() const noexcept = 0; // The span id for this span's parent. - virtual opentelemetry::trace::SpanId GetParentSpanId() const noexcept = 0; + opentelemetry::trace::SpanId GetParentSpanId() const noexcept = 0; // The name of this span. - virtual opentelemetry::nostd::string_view GetName() const noexcept = 0; + opentelemetry::nostd::string_view GetName() const noexcept = 0; // The status of this span. - virtual opentelemetry::trace::CanonicalCode GetStatus() const noexcept = 0; + opentelemetry::trace::CanonicalCode GetStatus() const noexcept = 0; // The start time of this span. - virtual opentelemetry::core::SystemTimestamp GetStartTime() const noexcept = 0; + opentelemetry::core::SystemTimestamp GetStartTime() const noexcept = 0; // The end time of this span. - virtual opentelemetry::core::SystemTimestamp GetEndTime() const noexcept = 0; + opentelemetry::core::SystemTimestamp GetEndTime() const noexcept = 0; }; } // namespace trace } // namespace sdk