Skip to content

Commit

Permalink
Merge branch 'main' into sync_gauge_2279
Browse files Browse the repository at this point in the history
  • Loading branch information
uuzay committed Oct 29, 2024
2 parents f84a896 + 5e62859 commit c9e40a5
Show file tree
Hide file tree
Showing 222 changed files with 2,759 additions and 1,400 deletions.
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ Checks: >
-misc-unused-alias-decls,
-misc-use-anonymous-namespace,
cppcoreguidelines-*,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-pro-*
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Run clang-tidy
run: |
cd build
make -j$(nproc) 2>&1 | tee -a clang-tidy.log || exit 1
make 2>&1 | tee -a clang-tidy.log || exit 1
- uses: actions/upload-artifact@v4
with:
Expand Down
11 changes: 10 additions & 1 deletion .iwyu.imp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@
# Work around for C++ STL
{ "include": ["<bits/chrono.h>", "private", "<chrono>", "public"] },

# Local opentelemetry-cpp
# Local opentelemetry-cpp style

# We prefer to include <gtest/gtest.h> for simplicity
{ "include": ["<gtest/gtest-message.h>", "private", "<gtest/gtest.h>", "public"] },
{ "include": ["<gtest/gtest-test-part.h>", "private", "<gtest/gtest.h>", "public"] },
{ "include": ["<gtest/gtest-param-test.h>", "private", "<gtest/gtest.h>", "public"] },
{ "include": ["<gtest/gtest_pred_impl.h>", "private", "<gtest/gtest.h>", "public"] },

# We prefer to include <gmock/gmock.h> for simplicity
{ "include": ["<gmock/gmock-function-mocker.h>", "private", "<gmock/gmock.h>", "public"] },
{ "include": ["<gmock/gmock-spec-builders.h>", "private", "<gmock/gmock.h>", "public"] },
]

106 changes: 106 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,118 @@ Increment the:

## [Unreleased]

* [API] Jaeger Propagator should not be deprecated
[#3086](https://github.com/open-telemetry/opentelemetry-cpp/pull/3086)

Important changes:

* [API] Jaeger Propagator should not be deprecated
[#3086](https://github.com/open-telemetry/opentelemetry-cpp/pull/3086)

* Deprecation of the Jaeger propagator, as announced on 2023-01-31
in version 1.8.2, is now reverted.
* This deprecation turned out to be not justified,
as the Jaeger propagator can be used without the (now removed)
Jaeger exporter.

## [1.17 2024-10-07]

* [CI] Add a clang-tidy build
[#3001](https://github.com/open-telemetry/opentelemetry-cpp/pull/3001)

* [BUILD] Upgrade to opentelemetry-proto 1.3.2
[#2991](https://github.com/open-telemetry/opentelemetry-cpp/pull/2991)

* [REMOVAL] Remove build option `WITH_DEPRECATED_SDK_FACTORY`
[#2717](https://github.com/open-telemetry/opentelemetry-cpp/pull/2717)

* [EXPORTER] ForceFlush before canceling the running requests on shutdown
[#2727](https://github.com/open-telemetry/opentelemetry-cpp/pull/2727)

* [SDK] Fix crash in PeriodicExportingMetricReader
[#2983](https://github.com/open-telemetry/opentelemetry-cpp/pull/2983)

* [SDK] Fix memory leak in TlsRandomNumberGenerator() constructor
[#2661](https://github.com/open-telemetry/opentelemetry-cpp/pull/2661)

* [EXPORTER] Ignore exception when create thread in OTLP file exporter
[#3012](https://github.com/open-telemetry/opentelemetry-cpp/pull/3012)

* [BUILD] Update the version in MODULE.bazel
[#3015](https://github.com/open-telemetry/opentelemetry-cpp/pull/3015)

* [BUILD] Fix build without vcpkg on Windows when gRPC is disabled
[#3016](https://github.com/open-telemetry/opentelemetry-cpp/pull/3016)

* [BUILD] Add abi_version_no bazel flag
[#3020](https://github.com/open-telemetry/opentelemetry-cpp/pull/3020)

* [Code health] Expand iwyu coverage to include unit tests
[#3022](https://github.com/open-telemetry/opentelemetry-cpp/pull/3022)

* [BUILD] Version opentelemetry_proto/proto_grpc shared libraries
[#2992](https://github.com/open-telemetry/opentelemetry-cpp/pull/2992)

* [SEMANTIC CONVENTIONS] Upgrade semantic conventions to 1.27.0
[#3023](https://github.com/open-telemetry/opentelemetry-cpp/pull/3023)

* [SDK] Support empty histogram buckets
[#3027](https://github.com/open-telemetry/opentelemetry-cpp/pull/3027)

* [TEST] Fix sync problems in OTLP File exporter tests
[#3031](https://github.com/open-telemetry/opentelemetry-cpp/pull/3031)

* [SDK] PeriodicExportingMetricReader: future is never set, blocks until timeout
[#3030](https://github.com/open-telemetry/opentelemetry-cpp/pull/3030)

* [Code Health] Clang Tidy cleanup, Part 2
[#3038](https://github.com/open-telemetry/opentelemetry-cpp/pull/3038)

* [Code Health] include-what-you-use cleanup, part 3
[#3004](https://github.com/open-telemetry/opentelemetry-cpp/pull/3004)

* [SDK] Fix overflow in timeout logic
[#3046](https://github.com/open-telemetry/opentelemetry-cpp/pull/3046)

* [TEST] Add missing tests to Bazel build
[#3045](https://github.com/open-telemetry/opentelemetry-cpp/pull/3045)

* [TEST] update collector tests with debug exporter
[#3050](https://github.com/open-telemetry/opentelemetry-cpp/pull/3050)

* [EXAMPLE] update collector example with debug exporter
[#3049](https://github.com/open-telemetry/opentelemetry-cpp/pull/3049)

* [TEST] update references to logging exporter
[#3053](https://github.com/open-telemetry/opentelemetry-cpp/pull/3053)

* [EXAMPLE] Clean the tracer initialization in OStream example
[#3051](https://github.com/open-telemetry/opentelemetry-cpp/pull/3051)

* [EXPORTER] Fix the format of SpanLink for ETW
[#3054](https://github.com/open-telemetry/opentelemetry-cpp/pull/3054)

* [EXPORTER] Add in-memory metric exporter
[#3043](https://github.com/open-telemetry/opentelemetry-cpp/pull/3043)

* [Code Health] include-what-you-use cleanup, part 4
[#3040](https://github.com/open-telemetry/opentelemetry-cpp/pull/3040)

* [BUILD] add loongarch info
[#3052](https://github.com/open-telemetry/opentelemetry-cpp/pull/3052)

* [CI] Update otel-collector version
[#3067](https://github.com/open-telemetry/opentelemetry-cpp/pull/3067)

* [SDK] Update MetricProducer interface to match spec
[#3044](https://github.com/open-telemetry/opentelemetry-cpp/pull/3044)

* [EXPORTER] Fix URL in ES exporter, fix ipv6 supporting for http client
[#3081](https://github.com/open-telemetry/opentelemetry-cpp/pull/3081)

* [EXPORTER] Add HttpHeaders in ElasticsearchLogRecordExporter
[#3083](https://github.com/open-telemetry/opentelemetry-cpp/pull/3083)

Breaking changes:

* [REMOVAL] Remove build option `WITH_DEPRECATED_SDK_FACTORY`
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ else()
set(ARCH s390x)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(sparc.*|SPARC.*)")
set(ARCH sparc)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(loongarch.*|LOONGARCH.*)")
set(ARCH loongarch)
else()
message(
FATAL_ERROR
Expand Down Expand Up @@ -285,6 +287,10 @@ option(WITH_ASYNC_EXPORT_PREVIEW "Whether to enable async export" OFF)
option(WITH_METRICS_EXEMPLAR_PREVIEW
"Whether to enable exemplar within metrics" OFF)

option(OPENTELEMETRY_SKIP_DYNAMIC_LOADING_TESTS
"Whether to build test libraries that are always linked as shared libs"
OFF)

#
# Verify options dependencies
#
Expand Down
40 changes: 1 addition & 39 deletions DEPRECATED.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,45 +46,7 @@ N/A

## [opentelemetry-cpp API]

### Jaeger propagator

#### Announcement (Jaeger)

* Version: 1.8.2
* Date: 2023-01-31
* PR: [DEPRECATION] Deprecate the Jaeger exporter
[#1923](https://github.com/open-telemetry/opentelemetry-cpp/pull/1923)

This PR also listed the Jaeger propagator as deprecated.

#### Motivation (Jaeger)

The Jaeger Exporter is now (July 2023) removed from the OpenTelemetry specification.

The Jaeger Propagator remains, because changing propagation is a longer
process compared to changing an export format.

New deployments however are encouraged to use a W3C compliant propagator,
and avoid the Jaeger propagator, which is now deprecated.

#### Scope (Jaeger)

The following are deprecated and planned for removal:

* the API header `opentelemetry/trace/propagation/jaeger.h`, including:
* the C++ class `JaegerPropagator`

#### Mitigation (Jaeger)

Use a W3C compliant propagator instead.

That is, use class HttpTraceContext and "traceparent" tags.

Do not use class JaegerPropagator and "uber-trace-id" tags.

#### Planned removal (Jaeger)

No date set yet for the Jaeger Propagator.
N/A

## [opentelemetry-cpp SDK]

Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module(
name = "opentelemetry-cpp",
version = "1.16.1",
version = "1.17.0",
compatibility_level = 0,
repo_name = "io_opentelemetry_cpp",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@

#pragma once

#include <memory>
#include <string>

#include "opentelemetry/baggage/baggage.h"
#include "opentelemetry/baggage/baggage_context.h"
#include "opentelemetry/context/context.h"
#include "opentelemetry/context/propagation/text_map_propagator.h"
#include "opentelemetry/nostd/function_ref.h"
#include "opentelemetry/nostd/string_view.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
Expand Down
5 changes: 5 additions & 0 deletions api/include/opentelemetry/common/key_value_iterable_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@

#pragma once

#include <stddef.h>
#include <initializer_list>
#include <iterator>
#include <type_traits>
#include <utility>
#include <vector>

#include "opentelemetry/common/attribute_value.h"
#include "opentelemetry/common/key_value_iterable.h"
#include "opentelemetry/nostd/function_ref.h"
#include "opentelemetry/nostd/span.h"
Expand Down
3 changes: 3 additions & 0 deletions api/include/opentelemetry/context/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
#pragma once

#include <cstring>
#include <utility>

#include "opentelemetry/context/context_value.h"
#include "opentelemetry/nostd/shared_ptr.h"
#include "opentelemetry/nostd/string_view.h"
#include "opentelemetry/nostd/variant.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
Expand Down
4 changes: 4 additions & 0 deletions api/include/opentelemetry/context/runtime_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

#pragma once

#include <stddef.h>
#include <algorithm>

#include "opentelemetry/common/macros.h"
#include "opentelemetry/context/context.h"
#include "opentelemetry/context/context_value.h"
#include "opentelemetry/nostd/shared_ptr.h"
#include "opentelemetry/nostd/string_view.h"
#include "opentelemetry/nostd/unique_ptr.h"
Expand Down
6 changes: 4 additions & 2 deletions api/include/opentelemetry/nostd/function_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@

#pragma once

#include <memory>
#include <iosfwd>
#include <memory> // IWYU pragma: keep
#include <type_traits>
#include <utility>

#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace nostd
{
template <class Sig>
class function_ref;
class function_ref; // IWYU pragma: keep

/**
* Non-owning function reference that can be used as a more performant
Expand Down
16 changes: 0 additions & 16 deletions api/include/opentelemetry/nostd/internal/absl/meta/type_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,6 @@ struct VoidTImpl {
using type = void;
};

// This trick to retrieve a default alignment is necessary for our
// implementation of aligned_storage_t to be consistent with any implementation
// of std::aligned_storage.
template <size_t Len, typename T = std::aligned_storage<Len>>
struct default_alignment_of_aligned_storage;

template <size_t Len, size_t Align>
struct default_alignment_of_aligned_storage<Len,
std::aligned_storage<Len, Align>> {
static constexpr size_t value = Align;
};

////////////////////////////////
// Library Fundamentals V2 TS //
////////////////////////////////
Expand Down Expand Up @@ -619,10 +607,6 @@ using remove_extent_t = typename std::remove_extent<T>::type;
template <typename T>
using remove_all_extents_t = typename std::remove_all_extents<T>::type;

template <size_t Len, size_t Align = type_traits_internal::
default_alignment_of_aligned_storage<Len>::value>
using aligned_storage_t = typename std::aligned_storage<Len, Align>::type;

template <typename T>
using decay_t = typename std::decay<T>::type;

Expand Down
5 changes: 3 additions & 2 deletions api/include/opentelemetry/nostd/string_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@

#if !defined(OPENTELEMETRY_HAVE_STD_STRING_VIEW)
# include <algorithm>
# include <cstddef>
# include <cstring>
# include <functional>
# include <ostream>
# include <stdexcept>
# include <string>
# include <type_traits>
# include <utility>

# include "opentelemetry/common/macros.h"
# include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/nostd/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ OPENTELEMETRY_END_NAMESPACE
# ifdef HAVE_ABSEIL
# include "absl/types/variant.h"
# else
# include "./internal/absl/types/variant.h"
# include "opentelemetry/nostd/internal/absl/types/variant.h"
# endif

# ifdef _MSC_VER
Expand Down
6 changes: 3 additions & 3 deletions api/include/opentelemetry/plugin/dynamic_load.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
#include <memory>
#include <string>

#include "opentelemetry/plugin/factory.h"
#include "opentelemetry/version.h"

#ifdef _WIN32
# include "opentelemetry/plugin/detail/dynamic_load_windows.h" // IWYU pragma: export
#else
# include "opentelemetry/plugin/detail/dynamic_load_unix.h" // IWYU pragma: export
#endif
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace plugin
{

class Factory;

/**
* Load an OpenTelemetry implementation as a plugin.
* @param plugin the path to the plugin to load
Expand Down
Loading

0 comments on commit c9e40a5

Please sign in to comment.