Skip to content

Commit 59d6a3b

Browse files
committed
[CONFIGURATION] File configuration - misc model
1 parent f16ea3b commit 59d6a3b

File tree

8 files changed

+221
-0
lines changed

8 files changed

+221
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
6+
#include <cstddef>
7+
8+
#include "opentelemetry/version.h"
9+
10+
OPENTELEMETRY_BEGIN_NAMESPACE
11+
namespace sdk
12+
{
13+
namespace configuration
14+
{
15+
16+
// YAML-SCHEMA: schema/opentelemetry_configuration.json
17+
// YAML-NODE: AttributeLimits
18+
class AttributeLimitsConfiguration
19+
{
20+
public:
21+
std::size_t attribute_value_length_limit;
22+
std::size_t attribute_count_limit;
23+
};
24+
25+
} // namespace configuration
26+
} // namespace sdk
27+
OPENTELEMETRY_END_NAMESPACE
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
6+
#include <map>
7+
#include <string>
8+
9+
#include "opentelemetry/version.h"
10+
11+
OPENTELEMETRY_BEGIN_NAMESPACE
12+
namespace sdk
13+
{
14+
namespace configuration
15+
{
16+
17+
// YAML-SCHEMA: schema/resource.json
18+
// YAML-NODE: AttributeNameValue
19+
// FIXME: Name/Value/Type
20+
class AttributesConfiguration
21+
{
22+
public:
23+
std::map<std::string, std::string> kv_map;
24+
};
25+
26+
} // namespace configuration
27+
} // namespace sdk
28+
OPENTELEMETRY_END_NAMESPACE
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
6+
#include <map>
7+
#include <memory>
8+
9+
#include "opentelemetry/sdk/configuration/string_array_configuration.h"
10+
#include "opentelemetry/version.h"
11+
12+
OPENTELEMETRY_BEGIN_NAMESPACE
13+
namespace sdk
14+
{
15+
namespace configuration
16+
{
17+
18+
// YAML-SCHEMA: schema/resource.json
19+
// YAML-NODE: Detectors
20+
class DetectorsConfiguration
21+
{
22+
public:
23+
std::unique_ptr<StringArrayConfiguration> included;
24+
std::unique_ptr<StringArrayConfiguration> excluded;
25+
};
26+
27+
} // namespace configuration
28+
} // namespace sdk
29+
OPENTELEMETRY_END_NAMESPACE
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
6+
#include <map>
7+
#include <string>
8+
9+
#include "opentelemetry/version.h"
10+
11+
OPENTELEMETRY_BEGIN_NAMESPACE
12+
namespace sdk
13+
{
14+
namespace configuration
15+
{
16+
17+
class HeadersConfiguration
18+
{
19+
public:
20+
std::map<std::string, std::string> kv_map;
21+
};
22+
23+
} // namespace configuration
24+
} // namespace sdk
25+
OPENTELEMETRY_END_NAMESPACE
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
6+
#include <cstdint>
7+
8+
#include "opentelemetry/version.h"
9+
10+
OPENTELEMETRY_BEGIN_NAMESPACE
11+
namespace sdk
12+
{
13+
namespace configuration
14+
{
15+
16+
enum enum_otlp_http_encoding : std::uint8_t
17+
{
18+
protobuf,
19+
json
20+
};
21+
22+
} // namespace configuration
23+
} // namespace sdk
24+
OPENTELEMETRY_END_NAMESPACE
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
6+
#include <string>
7+
#include <vector>
8+
9+
#include "opentelemetry/version.h"
10+
11+
OPENTELEMETRY_BEGIN_NAMESPACE
12+
namespace sdk
13+
{
14+
namespace configuration
15+
{
16+
17+
// YAML-SCHEMA: schema/propagator.json
18+
// YAML-NODE: Propagator
19+
class PropagatorConfiguration
20+
{
21+
public:
22+
std::vector<std::string> composite;
23+
};
24+
25+
} // namespace configuration
26+
} // namespace sdk
27+
OPENTELEMETRY_END_NAMESPACE
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
6+
#include <memory>
7+
#include <string>
8+
9+
#include "opentelemetry/sdk/configuration/attributes_configuration.h"
10+
#include "opentelemetry/sdk/configuration/detectors_configuration.h"
11+
#include "opentelemetry/version.h"
12+
13+
OPENTELEMETRY_BEGIN_NAMESPACE
14+
namespace sdk
15+
{
16+
namespace configuration
17+
{
18+
19+
// YAML-SCHEMA: schema/resource.json
20+
// YAML-NODE: Resource
21+
class ResourceConfiguration
22+
{
23+
public:
24+
std::unique_ptr<AttributesConfiguration> attributes;
25+
std::unique_ptr<DetectorsConfiguration> detectors;
26+
std::string schema_url;
27+
std::string attributes_list;
28+
};
29+
30+
} // namespace configuration
31+
} // namespace sdk
32+
OPENTELEMETRY_END_NAMESPACE
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright The OpenTelemetry Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
#pragma once
5+
6+
#include <map>
7+
#include <string>
8+
#include <vector>
9+
10+
#include "opentelemetry/version.h"
11+
12+
OPENTELEMETRY_BEGIN_NAMESPACE
13+
namespace sdk
14+
{
15+
namespace configuration
16+
{
17+
18+
// YAML-SCHEMA: schema/common.json
19+
// YAML-NODE: included
20+
// YAML-NODE: excluded
21+
class StringArrayConfiguration
22+
{
23+
public:
24+
std::vector<std::string> string_array;
25+
};
26+
27+
} // namespace configuration
28+
} // namespace sdk
29+
OPENTELEMETRY_END_NAMESPACE

0 commit comments

Comments
 (0)