Skip to content

Commit

Permalink
tracer
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianlin-Zhao committed Jul 30, 2020
1 parent 1f0b6e1 commit e0c8d5f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions api/include/opentelemetry/trace/tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,34 @@ class Tracer

virtual void CloseWithMicroseconds(uint64_t timeout) noexcept = 0;
};
class DefaultTracer: public Tracer {
public:
~DefaultTracer() = default;

/**
* Starts a span.
*
* Optionally sets attributes at Span creation from the given key/value pairs.
*
* Attributes will be processed in order, previous attributes with the same
* key will be overwritten.
*/
nostd::unique_ptr<Span> StartSpan(nostd::string_view name,
const KeyValueIterable &attributes,
const StartSpanOptions &options = {}) noexcept
{
return DefaultSpan::GetInvalid();
}

void ForceFlushWithMicroseconds(uint64_t timeout) noexcept
{
pass;
}

void CloseWithMicroseconds(uint64_t timeout) noexcept
{
pass;
}
};
} // namespace trace
OPENTELEMETRY_END_NAMESPACE

0 comments on commit e0c8d5f

Please sign in to comment.