Skip to content

Commit 96bf29b

Browse files
authored
Merge branch 'main' into poc_config_yaml
2 parents cb9e0d0 + f30ab92 commit 96bf29b

File tree

61 files changed

+1248
-406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1248
-406
lines changed

CHANGELOG.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,118 @@ Increment the:
1515

1616
## [Unreleased]
1717

18+
* [API] Jaeger Propagator should not be deprecated
19+
[#3086](https://github.com/open-telemetry/opentelemetry-cpp/pull/3086)
20+
21+
Important changes:
22+
23+
* [API] Jaeger Propagator should not be deprecated
24+
[#3086](https://github.com/open-telemetry/opentelemetry-cpp/pull/3086)
25+
26+
* Deprecation of the Jaeger propagator, as announced on 2023-01-31
27+
in version 1.8.2, is now reverted.
28+
* This deprecation turned out to be not justified,
29+
as the Jaeger propagator can be used without the (now removed)
30+
Jaeger exporter.
31+
32+
## [1.17 2024-10-07]
33+
1834
* [CI] Add a clang-tidy build
1935
[#3001](https://github.com/open-telemetry/opentelemetry-cpp/pull/3001)
2036

37+
* [BUILD] Upgrade to opentelemetry-proto 1.3.2
38+
[#2991](https://github.com/open-telemetry/opentelemetry-cpp/pull/2991)
39+
2140
* [REMOVAL] Remove build option `WITH_DEPRECATED_SDK_FACTORY`
2241
[#2717](https://github.com/open-telemetry/opentelemetry-cpp/pull/2717)
2342

43+
* [EXPORTER] ForceFlush before canceling the running requests on shutdown
44+
[#2727](https://github.com/open-telemetry/opentelemetry-cpp/pull/2727)
45+
46+
* [SDK] Fix crash in PeriodicExportingMetricReader
47+
[#2983](https://github.com/open-telemetry/opentelemetry-cpp/pull/2983)
48+
49+
* [SDK] Fix memory leak in TlsRandomNumberGenerator() constructor
50+
[#2661](https://github.com/open-telemetry/opentelemetry-cpp/pull/2661)
51+
52+
* [EXPORTER] Ignore exception when create thread in OTLP file exporter
53+
[#3012](https://github.com/open-telemetry/opentelemetry-cpp/pull/3012)
54+
55+
* [BUILD] Update the version in MODULE.bazel
56+
[#3015](https://github.com/open-telemetry/opentelemetry-cpp/pull/3015)
57+
58+
* [BUILD] Fix build without vcpkg on Windows when gRPC is disabled
59+
[#3016](https://github.com/open-telemetry/opentelemetry-cpp/pull/3016)
60+
61+
* [BUILD] Add abi_version_no bazel flag
62+
[#3020](https://github.com/open-telemetry/opentelemetry-cpp/pull/3020)
63+
64+
* [Code health] Expand iwyu coverage to include unit tests
65+
[#3022](https://github.com/open-telemetry/opentelemetry-cpp/pull/3022)
66+
67+
* [BUILD] Version opentelemetry_proto/proto_grpc shared libraries
68+
[#2992](https://github.com/open-telemetry/opentelemetry-cpp/pull/2992)
69+
70+
* [SEMANTIC CONVENTIONS] Upgrade semantic conventions to 1.27.0
71+
[#3023](https://github.com/open-telemetry/opentelemetry-cpp/pull/3023)
72+
73+
* [SDK] Support empty histogram buckets
74+
[#3027](https://github.com/open-telemetry/opentelemetry-cpp/pull/3027)
75+
76+
* [TEST] Fix sync problems in OTLP File exporter tests
77+
[#3031](https://github.com/open-telemetry/opentelemetry-cpp/pull/3031)
78+
79+
* [SDK] PeriodicExportingMetricReader: future is never set, blocks until timeout
80+
[#3030](https://github.com/open-telemetry/opentelemetry-cpp/pull/3030)
81+
82+
* [Code Health] Clang Tidy cleanup, Part 2
83+
[#3038](https://github.com/open-telemetry/opentelemetry-cpp/pull/3038)
84+
85+
* [Code Health] include-what-you-use cleanup, part 3
86+
[#3004](https://github.com/open-telemetry/opentelemetry-cpp/pull/3004)
87+
88+
* [SDK] Fix overflow in timeout logic
89+
[#3046](https://github.com/open-telemetry/opentelemetry-cpp/pull/3046)
90+
91+
* [TEST] Add missing tests to Bazel build
92+
[#3045](https://github.com/open-telemetry/opentelemetry-cpp/pull/3045)
93+
94+
* [TEST] update collector tests with debug exporter
95+
[#3050](https://github.com/open-telemetry/opentelemetry-cpp/pull/3050)
96+
97+
* [EXAMPLE] update collector example with debug exporter
98+
[#3049](https://github.com/open-telemetry/opentelemetry-cpp/pull/3049)
99+
100+
* [TEST] update references to logging exporter
101+
[#3053](https://github.com/open-telemetry/opentelemetry-cpp/pull/3053)
102+
103+
* [EXAMPLE] Clean the tracer initialization in OStream example
104+
[#3051](https://github.com/open-telemetry/opentelemetry-cpp/pull/3051)
105+
106+
* [EXPORTER] Fix the format of SpanLink for ETW
107+
[#3054](https://github.com/open-telemetry/opentelemetry-cpp/pull/3054)
108+
24109
* [EXPORTER] Add in-memory metric exporter
25110
[#3043](https://github.com/open-telemetry/opentelemetry-cpp/pull/3043)
26111

112+
* [Code Health] include-what-you-use cleanup, part 4
113+
[#3040](https://github.com/open-telemetry/opentelemetry-cpp/pull/3040)
114+
115+
* [BUILD] add loongarch info
116+
[#3052](https://github.com/open-telemetry/opentelemetry-cpp/pull/3052)
117+
118+
* [CI] Update otel-collector version
119+
[#3067](https://github.com/open-telemetry/opentelemetry-cpp/pull/3067)
120+
121+
* [SDK] Update MetricProducer interface to match spec
122+
[#3044](https://github.com/open-telemetry/opentelemetry-cpp/pull/3044)
123+
124+
* [EXPORTER] Fix URL in ES exporter, fix ipv6 supporting for http client
125+
[#3081](https://github.com/open-telemetry/opentelemetry-cpp/pull/3081)
126+
127+
* [EXPORTER] Add HttpHeaders in ElasticsearchLogRecordExporter
128+
[#3083](https://github.com/open-telemetry/opentelemetry-cpp/pull/3083)
129+
27130
Breaking changes:
28131

29132
* [REMOVAL] Remove build option `WITH_DEPRECATED_SDK_FACTORY`

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ else()
7777
set(ARCH s390x)
7878
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(sparc.*|SPARC.*)")
7979
set(ARCH sparc)
80+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(loongarch.*|LOONGARCH.*)")
81+
set(ARCH loongarch)
8082
else()
8183
message(
8284
FATAL_ERROR
@@ -287,6 +289,10 @@ option(WITH_ASYNC_EXPORT_PREVIEW "Whether to enable async export" OFF)
287289
option(WITH_METRICS_EXEMPLAR_PREVIEW
288290
"Whether to enable exemplar within metrics" OFF)
289291

292+
option(OPENTELEMETRY_SKIP_DYNAMIC_LOADING_TESTS
293+
"Whether to build test libraries that are always linked as shared libs"
294+
OFF)
295+
290296
#
291297
# Verify options dependencies
292298
#

DEPRECATED.md

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -46,45 +46,7 @@ N/A
4646

4747
## [opentelemetry-cpp API]
4848

49-
### Jaeger propagator
50-
51-
#### Announcement (Jaeger)
52-
53-
* Version: 1.8.2
54-
* Date: 2023-01-31
55-
* PR: [DEPRECATION] Deprecate the Jaeger exporter
56-
[#1923](https://github.com/open-telemetry/opentelemetry-cpp/pull/1923)
57-
58-
This PR also listed the Jaeger propagator as deprecated.
59-
60-
#### Motivation (Jaeger)
61-
62-
The Jaeger Exporter is now (July 2023) removed from the OpenTelemetry specification.
63-
64-
The Jaeger Propagator remains, because changing propagation is a longer
65-
process compared to changing an export format.
66-
67-
New deployments however are encouraged to use a W3C compliant propagator,
68-
and avoid the Jaeger propagator, which is now deprecated.
69-
70-
#### Scope (Jaeger)
71-
72-
The following are deprecated and planned for removal:
73-
74-
* the API header `opentelemetry/trace/propagation/jaeger.h`, including:
75-
* the C++ class `JaegerPropagator`
76-
77-
#### Mitigation (Jaeger)
78-
79-
Use a W3C compliant propagator instead.
80-
81-
That is, use class HttpTraceContext and "traceparent" tags.
82-
83-
Do not use class JaegerPropagator and "uber-trace-id" tags.
84-
85-
#### Planned removal (Jaeger)
86-
87-
No date set yet for the Jaeger Propagator.
49+
N/A
8850

8951
## [opentelemetry-cpp SDK]
9052

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
module(
55
name = "opentelemetry-cpp",
6-
version = "1.16.1",
6+
version = "1.17.0",
77
compatibility_level = 0,
88
repo_name = "io_opentelemetry_cpp",
99
)

api/include/opentelemetry/metrics/meter.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class Histogram;
2121
template <typename T>
2222
class UpDownCounter;
2323

24+
template <typename T>
25+
class Gauge;
26+
2427
class ObservableInstrument;
2528

2629
/**
@@ -91,6 +94,27 @@ class Meter
9194
nostd::string_view description = "",
9295
nostd::string_view unit = "") noexcept = 0;
9396

97+
#if OPENTELEMETRY_ABI_VERSION_NO >= 2
98+
/**
99+
* Creates a Gauge with the passed characteristics and returns a unique_ptr to that Gauge.
100+
*
101+
* @param name the name of the new Gauge.
102+
* @param description a brief description of what the Gauge is used for.
103+
* @param unit the unit of metric values following https://unitsofmeasure.org/ucum.html.
104+
* @return a unique pointer to the created Gauge.
105+
*/
106+
107+
virtual nostd::unique_ptr<Gauge<int64_t>> CreateInt64Gauge(
108+
nostd::string_view name,
109+
nostd::string_view description = "",
110+
nostd::string_view unit = "") noexcept = 0;
111+
112+
virtual nostd::unique_ptr<Gauge<double>> CreateDoubleGauge(
113+
nostd::string_view name,
114+
nostd::string_view description = "",
115+
nostd::string_view unit = "") noexcept = 0;
116+
#endif
117+
94118
/**
95119
* Creates a Asynchronous (Observable) Gauge with the passed characteristics and returns a
96120
* shared_ptr to that Observable Gauge

api/include/opentelemetry/metrics/noop.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,26 @@ class NoopUpDownCounter : public UpDownCounter<T>
7171
{}
7272
};
7373

74+
#if OPENTELEMETRY_ABI_VERSION_NO >= 2
75+
template <class T>
76+
class NoopGauge : public Gauge<T>
77+
{
78+
public:
79+
NoopGauge(nostd::string_view /* name */,
80+
nostd::string_view /* description */,
81+
nostd::string_view /* unit */) noexcept
82+
{}
83+
~NoopGauge() override = default;
84+
void Record(T /* value */) noexcept override {}
85+
void Record(T /* value */, const context::Context & /* context */) noexcept override {}
86+
void Record(T /* value */, const common::KeyValueIterable & /* attributes */) noexcept override {}
87+
void Record(T /* value */,
88+
const common::KeyValueIterable & /* attributes */,
89+
const context::Context & /* context */) noexcept override
90+
{}
91+
};
92+
#endif
93+
7494
class NoopObservableInstrument : public ObservableInstrument
7595
{
7696
public:
@@ -140,6 +160,22 @@ class NoopMeter final : public Meter
140160
return nostd::unique_ptr<Histogram<double>>{new NoopHistogram<double>(name, description, unit)};
141161
}
142162

163+
#if OPENTELEMETRY_ABI_VERSION_NO >= 2
164+
nostd::unique_ptr<Gauge<int64_t>> CreateInt64Gauge(nostd::string_view name,
165+
nostd::string_view description = "",
166+
nostd::string_view unit = "") noexcept override
167+
{
168+
return nostd::unique_ptr<Gauge<int64_t>>{new NoopGauge<int64_t>(name, description, unit)};
169+
}
170+
171+
nostd::unique_ptr<Gauge<double>> CreateDoubleGauge(nostd::string_view name,
172+
nostd::string_view description = "",
173+
nostd::string_view unit = "") noexcept override
174+
{
175+
return nostd::unique_ptr<Gauge<double>>{new NoopGauge<double>(name, description, unit)};
176+
}
177+
#endif
178+
143179
nostd::shared_ptr<ObservableInstrument> CreateInt64ObservableGauge(
144180
nostd::string_view name,
145181
nostd::string_view description = "",

api/include/opentelemetry/metrics/sync_instruments.h

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,5 +247,82 @@ class UpDownCounter : public SynchronousInstrument
247247
}
248248
};
249249

250+
#if OPENTELEMETRY_ABI_VERSION_NO >= 2
251+
/* A Gauge instrument that records values. */
252+
template <class T>
253+
class Gauge : public SynchronousInstrument
254+
{
255+
256+
public:
257+
/**
258+
* Record a value
259+
*
260+
* @param value The measurement value. May be positive, negative or zero.
261+
*/
262+
virtual void Record(T value) noexcept = 0;
263+
264+
/**
265+
* Record a value
266+
*
267+
* @param value The measurement value. May be positive, negative or zero.
268+
* @param context The explicit context to associate with this measurement.
269+
*/
270+
virtual void Record(T value, const context::Context &context) noexcept = 0;
271+
272+
/**
273+
* Record a value with a set of attributes.
274+
*
275+
* @param value The measurement value. May be positive, negative or zero.
276+
* @param attributes A set of attributes to associate with the value.
277+
*/
278+
279+
virtual void Record(T value, const common::KeyValueIterable &attributes) noexcept = 0;
280+
281+
/**
282+
* Record a value with a set of attributes.
283+
*
284+
* @param value The measurement value. May be positive, negative or zero.
285+
* @param attributes A set of attributes to associate with the value.
286+
* @param context The explicit context to associate with this measurement.
287+
*/
288+
virtual void Record(T value,
289+
const common::KeyValueIterable &attributes,
290+
const context::Context &context) noexcept = 0;
291+
292+
template <class U,
293+
nostd::enable_if_t<common::detail::is_key_value_iterable<U>::value> * = nullptr>
294+
void Record(T value, const U &attributes) noexcept
295+
{
296+
this->Record(value, common::KeyValueIterableView<U>{attributes});
297+
}
298+
299+
template <class U,
300+
nostd::enable_if_t<common::detail::is_key_value_iterable<U>::value> * = nullptr>
301+
void Record(T value, const U &attributes, const context::Context &context) noexcept
302+
{
303+
this->Record(value, common::KeyValueIterableView<U>{attributes}, context);
304+
}
305+
306+
void Record(T value,
307+
std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>>
308+
attributes) noexcept
309+
{
310+
this->Record(value, nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>{
311+
attributes.begin(), attributes.end()});
312+
}
313+
314+
void Record(
315+
T value,
316+
std::initializer_list<std::pair<nostd::string_view, common::AttributeValue>> attributes,
317+
const context::Context &context) noexcept
318+
{
319+
this->Record(value,
320+
nostd::span<const std::pair<nostd::string_view, common::AttributeValue>>{
321+
attributes.begin(), attributes.end()},
322+
context);
323+
}
324+
};
325+
#endif
326+
250327
} // namespace metrics
251328
OPENTELEMETRY_END_NAMESPACE

api/include/opentelemetry/nostd/internal/absl/meta/type_traits.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,6 @@ struct VoidTImpl {
106106
using type = void;
107107
};
108108

109-
// This trick to retrieve a default alignment is necessary for our
110-
// implementation of aligned_storage_t to be consistent with any implementation
111-
// of std::aligned_storage.
112-
template <size_t Len, typename T = std::aligned_storage<Len>>
113-
struct default_alignment_of_aligned_storage;
114-
115-
template <size_t Len, size_t Align>
116-
struct default_alignment_of_aligned_storage<Len,
117-
std::aligned_storage<Len, Align>> {
118-
static constexpr size_t value = Align;
119-
};
120-
121109
////////////////////////////////
122110
// Library Fundamentals V2 TS //
123111
////////////////////////////////
@@ -619,10 +607,6 @@ using remove_extent_t = typename std::remove_extent<T>::type;
619607
template <typename T>
620608
using remove_all_extents_t = typename std::remove_all_extents<T>::type;
621609

622-
template <size_t Len, size_t Align = type_traits_internal::
623-
default_alignment_of_aligned_storage<Len>::value>
624-
using aligned_storage_t = typename std::aligned_storage<Len, Align>::type;
625-
626610
template <typename T>
627611
using decay_t = typename std::decay<T>::type;
628612

0 commit comments

Comments
 (0)