azure-core
Loading...
Searching...
No Matches
tracing.hpp
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
9#pragma once
10
12
13#include <memory>
14#include <string>
15
16namespace Azure { namespace Core { namespace Tracing {
17 class TracerProvider;
18 namespace _internal {
19 class Tracer;
23 class TracerProviderImpl {
24 public:
33 virtual std::shared_ptr<Azure::Core::Tracing::_internal::Tracer> CreateTracer(
34 std::string const& name,
35 std::string const& version = {}) const = 0;
36
37 virtual ~TracerProviderImpl() = default;
38 };
39
40 struct TracerProviderImplGetter
41 {
48 static std::shared_ptr<TracerProviderImpl> TracerImplFromTracer(
49 std::shared_ptr<TracerProvider> const& provider);
50 };
51
52 } // namespace _internal
53
57 class TracerProvider : private _internal::TracerProviderImpl {
58 // Marked TracerImplFromTracer as friend so it can access private members in the class.
59 friend std::shared_ptr<TracerProviderImpl>
60 _internal::TracerProviderImplGetter::TracerImplFromTracer(
61 std::shared_ptr<TracerProvider> const&);
62 };
63
64}}} // namespace Azure::Core::Tracing
Trace Provider - factory for creating Tracer objects.
Definition tracing.hpp:57
Context for canceling long running operations.
Compute the hash value for the input binary data, using SHA256, SHA384 and SHA512.
Definition azure_assert.hpp:57