Skip to content

Commit 64d52c1

Browse files
committed
Fixed TODO for enum temporality_preference
1 parent ccd0453 commit 64d52c1

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

sdk/include/opentelemetry/sdk/configuration/otlp_file_push_metric_exporter_configuration.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "opentelemetry/sdk/configuration/headers_configuration.h"
1010
#include "opentelemetry/sdk/configuration/push_metric_exporter_configuration.h"
1111
#include "opentelemetry/sdk/configuration/push_metric_exporter_configuration_visitor.h"
12+
#include "opentelemetry/sdk/configuration/temporality_preference.h"
1213
#include "opentelemetry/version.h"
1314

1415
OPENTELEMETRY_BEGIN_NAMESPACE
@@ -28,7 +29,7 @@ class OtlpFilePushMetricExporterConfiguration : public PushMetricExporterConfigu
2829
}
2930

3031
std::string output_stream;
31-
std::string temporality_preference; // FIXME: enum
32+
enum_temporality_preference temporality_preference{cumulative};
3233
enum_default_histogram_aggregation default_histogram_aggregation{explicit_bucket_histogram};
3334
};
3435

sdk/include/opentelemetry/sdk/configuration/otlp_grpc_push_metric_exporter_configuration.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "opentelemetry/sdk/configuration/headers_configuration.h"
1111
#include "opentelemetry/sdk/configuration/push_metric_exporter_configuration.h"
1212
#include "opentelemetry/sdk/configuration/push_metric_exporter_configuration_visitor.h"
13+
#include "opentelemetry/sdk/configuration/temporality_preference.h"
1314
#include "opentelemetry/version.h"
1415

1516
OPENTELEMETRY_BEGIN_NAMESPACE
@@ -37,7 +38,7 @@ class OtlpGrpcPushMetricExporterConfiguration : public PushMetricExporterConfigu
3738
std::string compression;
3839
std::size_t timeout{0};
3940
bool insecure{false};
40-
std::string temporality_preference; // FIXME: enum
41+
enum_temporality_preference temporality_preference{cumulative};
4142
enum_default_histogram_aggregation default_histogram_aggregation{explicit_bucket_histogram};
4243
};
4344

sdk/include/opentelemetry/sdk/configuration/otlp_http_push_metric_exporter_configuration.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "opentelemetry/sdk/configuration/otlp_http_encoding.h"
1212
#include "opentelemetry/sdk/configuration/push_metric_exporter_configuration.h"
1313
#include "opentelemetry/sdk/configuration/push_metric_exporter_configuration_visitor.h"
14+
#include "opentelemetry/sdk/configuration/temporality_preference.h"
1415
#include "opentelemetry/version.h"
1516

1617
OPENTELEMETRY_BEGIN_NAMESPACE
@@ -38,7 +39,7 @@ class OtlpHttpPushMetricExporterConfiguration : public PushMetricExporterConfigu
3839
std::string compression;
3940
std::size_t timeout{0};
4041
enum_otlp_http_encoding encoding{protobuf};
41-
std::string temporality_preference; // FIXME: enum
42+
enum_temporality_preference temporality_preference{cumulative};
4243
enum_default_histogram_aggregation default_histogram_aggregation{explicit_bucket_histogram};
4344
};
4445

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 <cstdint>
7+
8+
#include "opentelemetry/version.h"
9+
10+
OPENTELEMETRY_BEGIN_NAMESPACE
11+
namespace sdk
12+
{
13+
namespace configuration
14+
{
15+
16+
enum enum_temporality_preference : std::uint8_t
17+
{
18+
cumulative,
19+
delta,
20+
low_memory
21+
};
22+
23+
} // namespace configuration
24+
} // namespace sdk
25+
OPENTELEMETRY_END_NAMESPACE

0 commit comments

Comments
 (0)