21 namespace Azure {
namespace Core {
namespace Http {
25 namespace Azure {
namespace Core {
namespace Tracing {
67 virtual void AddAttribute(std::string
const& attributeName,
bool value) = 0;
74 virtual void AddAttribute(std::string
const& attributeName, int32_t value) = 0;
81 virtual void AddAttribute(std::string
const& attributeName, int64_t value) = 0;
88 virtual void AddAttribute(std::string
const& attributeName, uint64_t value) = 0;
95 virtual void AddAttribute(std::string
const& attributeName,
double value) = 0;
102 virtual void AddAttribute(std::string
const& attributeName,
const char* value) = 0;
109 virtual void AddAttribute(std::string
const& attributeName, std::string
const& value) = 0;
115 virtual ~AttributeSet() =
default;
120 class SpanKind final :
public Azure::Core::_internal::ExtendableEnumeration<SpanKind> {
122 explicit SpanKind(std::string
const& kind) : ExtendableEnumeration(kind) {}
123 SpanKind() =
default;
155 class SpanStatus final :
public Azure::Core::_internal::ExtendableEnumeration<SpanStatus> {
158 explicit SpanStatus(std::string
const& status) : ExtendableEnumeration(status) {}
159 SpanStatus() =
default;
190 virtual void AddAttributes(AttributeSet
const& attributeToAdd) = 0;
198 virtual void AddAttribute(std::string
const& attributeName, std::string
const& attributeValue)
210 virtual void AddEvent(std::string
const& eventName, AttributeSet
const& eventAttributes) = 0;
219 virtual void AddEvent(std::string
const& eventName) = 0;
225 virtual void AddEvent(std::exception
const& exception) = 0;
233 virtual void SetStatus(SpanStatus
const& status, std::string
const& description =
"") = 0;
248 struct CreateSpanOptions final
254 SpanKind Kind{SpanKind::Internal};
259 std::unique_ptr<AttributeSet> Attributes;
264 std::shared_ptr<Span> ParentSpan;
286 virtual std::shared_ptr<Span> CreateSpan(
287 std::string
const& spanName,
288 CreateSpanOptions
const& options = {})
const = 0;
290 virtual std::unique_ptr<AttributeSet> CreateAttributeSet()
const = 0;
307 virtual std::shared_ptr<Azure::Core::Tracing::_internal::Tracer>
CreateTracer(
308 std::string
const& name,
309 std::string
const& version =
"")
const = 0;