forked from open-telemetry/opentelemetry-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtracer_provider.h
31 lines (28 loc) · 850 Bytes
/
tracer_provider.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "opentelemetry/nostd/shared_ptr.h"
#include "opentelemetry/nostd/string_view.h"
#include "opentelemetry/trace/tracer.h"
OPENTELEMETRY_BEGIN_NAMESPACE
namespace trace
{
/**
* Creates new Tracer instances.
*/
class TracerProvider
{
public:
virtual ~TracerProvider() = default;
/**
* Gets or creates a named tracer instance.
*
* Optionally a version can be passed to create a named and versioned tracer
* instance.
*/
virtual nostd::shared_ptr<Tracer> GetTracer(nostd::string_view library_name,
nostd::string_view library_version = "",
nostd::string_view schema_url = "") = 0;
};
} // namespace trace
OPENTELEMETRY_END_NAMESPACE