Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Tax committed Mar 25, 2020
1 parent 8e581fa commit 9a9e331
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions sdk/include/opentelemetry/sdk/trace/processor.h
Original file line number Diff line number Diff line change
@@ -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 <chrono>
#include "opentelemetry/sdk/trace/recordable.h"
#include "opentelemetry/trace/span.h"

OPENTELEMETRY_BEGIN_NAMESPACE
Expand All @@ -26,13 +25,14 @@ class SpanProcessor

// OnEnd is called when a span is ended.
virtual void OnEnd(
nostd::shared_ptr<opentelemetry::sdk::trace::Recordable> &recordable) noexcept = 0;
std::shared_ptr<opentelemetry::sdk::trace::Recordable> &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;
Expand Down
14 changes: 7 additions & 7 deletions sdk/include/opentelemetry/sdk/trace/span_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a9e331

Please sign in to comment.