Skip to content

Commit a047465

Browse files
authored
Merge pull request #73 from open-telemetry/main
merged from upstream
2 parents 830df28 + 6445819 commit a047465

File tree

11 files changed

+145
-82
lines changed

11 files changed

+145
-82
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`

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

api/include/opentelemetry/trace/default_span.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class DefaultSpan : public Span
6666
DefaultSpan(SpanContext span_context) noexcept : span_context_(span_context) {}
6767

6868
// movable and copiable
69-
DefaultSpan(DefaultSpan &&spn) noexcept : span_context_(spn.GetContext()) {}
70-
DefaultSpan(const DefaultSpan &spn) noexcept : span_context_(spn.GetContext()) {}
69+
DefaultSpan(DefaultSpan &&spn) noexcept : Span(), span_context_(spn.GetContext()) {}
70+
DefaultSpan(const DefaultSpan &spn) noexcept : Span(), span_context_(spn.GetContext()) {}
7171

7272
private:
7373
SpanContext span_context_;

api/include/opentelemetry/trace/propagation/jaeger.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33

44
#pragma once
55

6-
#ifdef OPENTELEMETRY_NO_DEPRECATED_CODE
7-
# error "header <opentelemetry/trace/propagation/jaeger.h> is deprecated."
8-
#endif
9-
106
#include "detail/hex.h"
117
#include "detail/string.h"
128
#include "opentelemetry/context/propagation/text_map_propagator.h"
@@ -21,7 +17,7 @@ namespace propagation
2117

2218
static const nostd::string_view kJaegerTraceHeader = "uber-trace-id";
2319

24-
class OPENTELEMETRY_DEPRECATED JaegerPropagator : public context::propagation::TextMapPropagator
20+
class JaegerPropagator : public context::propagation::TextMapPropagator
2521
{
2622
public:
2723
void Inject(context::propagation::TextMapCarrier &carrier,

api/include/opentelemetry/version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
# define OPENTELEMETRY_ABI_VERSION_NO 1
1111
#endif
1212

13-
#define OPENTELEMETRY_VERSION "1.16.1"
13+
#define OPENTELEMETRY_VERSION "1.17.0"
1414
#define OPENTELEMETRY_VERSION_MAJOR 1
15-
#define OPENTELEMETRY_VERSION_MINOR 16
16-
#define OPENTELEMETRY_VERSION_PATCH 1
15+
#define OPENTELEMETRY_VERSION_MINOR 17
16+
#define OPENTELEMETRY_VERSION_PATCH 0
1717

1818
#define OPENTELEMETRY_ABI_VERSION OPENTELEMETRY_STRINGIFY(OPENTELEMETRY_ABI_VERSION_NO)
1919

api/test/trace/propagation/CMakeLists.txt

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
add_subdirectory(detail)
55

6-
foreach(testname http_text_format_test b3_propagation_test)
6+
foreach(testname http_text_format_test b3_propagation_test
7+
jaeger_propagation_test)
78
add_executable(${testname} "${testname}.cc")
89
target_link_libraries(${testname} ${GTEST_BOTH_LIBRARIES}
910
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api)
@@ -12,16 +13,3 @@ foreach(testname http_text_format_test b3_propagation_test)
1213
TEST_PREFIX trace.
1314
TEST_LIST ${testname})
1415
endforeach()
15-
16-
if(NOT WITH_NO_DEPRECATED_CODE)
17-
foreach(testname jaeger_propagation_test)
18-
19-
add_executable(${testname} "${testname}.cc")
20-
target_link_libraries(${testname} ${GTEST_BOTH_LIBRARIES}
21-
${CMAKE_THREAD_LIBS_INIT} opentelemetry_api)
22-
gtest_add_tests(
23-
TARGET ${testname}
24-
TEST_PREFIX trace.
25-
TEST_LIST ${testname})
26-
endforeach()
27-
endif()

docs/public/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
author = 'OpenTelemetry authors'
2525

2626
# The full version, including alpha/beta/rc tags
27-
release = "1.16.1"
27+
release = "1.17.0"
2828

2929
# Run sphinx on subprojects and copy output
3030
# -----------------------------------------

exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_record_exporter.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ namespace logs
2626
*/
2727
struct ElasticsearchExporterOptions
2828
{
29+
using HttpHeaders = std::multimap<std::string, std::string>;
30+
2931
// Configuration options to establish Elasticsearch connection
3032
std::string host_;
3133
int port_;
@@ -37,6 +39,9 @@ struct ElasticsearchExporterOptions
3739
// Whether to print the status of the exporter in the console
3840
bool console_debug_;
3941

42+
/** Additional HTTP headers. */
43+
HttpHeaders http_headers_;
44+
4045
/**
4146
* Constructor for the ElasticsearchExporterOptions. By default, the endpoint is
4247
* localhost:9200/logs with a timeout of 30 seconds and disabled console debugging
@@ -47,16 +52,18 @@ struct ElasticsearchExporterOptions
4752
* from elasticsearch
4853
* @param console_debug If true, print the status of the exporter methods in the console
4954
*/
50-
ElasticsearchExporterOptions(std::string host = "localhost",
51-
int port = 9200,
52-
std::string index = "logs",
53-
int response_timeout = 30,
54-
bool console_debug = false)
55+
ElasticsearchExporterOptions(std::string host = "localhost",
56+
int port = 9200,
57+
std::string index = "logs",
58+
int response_timeout = 30,
59+
bool console_debug = false,
60+
HttpHeaders http_headers = {})
5561
: host_{host},
5662
port_{port},
5763
index_{index},
5864
response_timeout_{response_timeout},
59-
console_debug_{console_debug}
65+
console_debug_{console_debug},
66+
http_headers_{http_headers}
6067
{}
6168
};
6269

exporters/elasticsearch/src/es_log_record_exporter.cc

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,12 @@ class AsyncResponseHandler : public http_client::EventHandler
288288
#endif
289289

290290
ElasticsearchLogRecordExporter::ElasticsearchLogRecordExporter()
291-
: options_{ElasticsearchExporterOptions()},
291+
: ElasticsearchLogRecordExporter(ElasticsearchExporterOptions())
292+
{}
293+
294+
ElasticsearchLogRecordExporter::ElasticsearchLogRecordExporter(
295+
const ElasticsearchExporterOptions &options)
296+
: options_{options},
292297
http_client_{ext::http::client::HttpClientFactory::Create()}
293298
#ifdef ENABLE_ASYNC_EXPORT
294299
,
@@ -301,11 +306,6 @@ ElasticsearchLogRecordExporter::ElasticsearchLogRecordExporter()
301306
#endif
302307
}
303308

304-
ElasticsearchLogRecordExporter::ElasticsearchLogRecordExporter(
305-
const ElasticsearchExporterOptions &options)
306-
: options_{options}, http_client_{ext::http::client::HttpClientFactory::Create()}
307-
{}
308-
309309
std::unique_ptr<sdklogs::Recordable> ElasticsearchLogRecordExporter::MakeRecordable() noexcept
310310
{
311311
return std::unique_ptr<sdklogs::Recordable>(new ElasticSearchRecordable());
@@ -330,6 +330,13 @@ sdk::common::ExportResult ElasticsearchLogRecordExporter::Export(
330330
request->SetUri(options_.index_ + "/_bulk?pretty");
331331
request->SetMethod(http_client::Method::Post);
332332
request->AddHeader("Content-Type", "application/json");
333+
334+
// Add options headers
335+
for (auto it = options_.http_headers_.cbegin(); it != options_.http_headers_.cend(); ++it)
336+
{
337+
request->AddHeader(it->first, it->second);
338+
}
339+
333340
request->SetTimeoutMs(std::chrono::milliseconds(1000 * options_.response_timeout_));
334341

335342
// Create the request body

sdk/include/opentelemetry/sdk/version/version.h

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

44
#pragma once
55

6-
#define OPENTELEMETRY_SDK_VERSION "1.16.1"
6+
#define OPENTELEMETRY_SDK_VERSION "1.17.0"
77

88
#include "opentelemetry/version.h"
99

0 commit comments

Comments
 (0)