]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | // Copyright The OpenTelemetry Authors |
2 | // SPDX-License-Identifier: Apache-2.0 | |
3 | ||
4 | #pragma once | |
5 | ||
6 | #include "opentelemetry/nostd/unique_ptr.h" | |
7 | #include "opentelemetry/version.h" | |
8 | ||
9 | OPENTELEMETRY_BEGIN_NAMESPACE | |
10 | namespace sdk | |
11 | { | |
12 | namespace resource | |
13 | { | |
14 | ||
15 | class Resource; | |
16 | ||
17 | /** | |
18 | * Interface for a Resource Detector | |
19 | */ | |
20 | class ResourceDetector | |
21 | { | |
22 | public: | |
23 | virtual Resource Detect() = 0; | |
24 | }; | |
25 | ||
26 | /** | |
27 | * OTelResourceDetector to detect the presence of and create a Resource | |
28 | * from the OTEL_RESOURCE_ATTRIBUTES environment variable. | |
29 | */ | |
30 | class OTELResourceDetector : public ResourceDetector | |
31 | { | |
32 | public: | |
33 | Resource Detect() noexcept override; | |
34 | }; | |
35 | ||
36 | } // namespace resource | |
37 | } // namespace sdk | |
38 | OPENTELEMETRY_END_NAMESPACE |