Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update opentelemetry-cpp to 1.17.0 #221

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions deps/opentelemetry-cpp/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# bazel configurations for running tests under sanitizers.
# Based on https://github.com/bazelment/trunk/blob/master/tools/bazel.rc

# TODO: Remove once support is added, avoid MODULE.bazel creation for now
common --enable_bzlmod=false

# Enable automatic configs based on platform
common --enable_platform_specific_config

Expand Down
42 changes: 42 additions & 0 deletions deps/opentelemetry-cpp/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

Checks: >
-*,
performance-*,
portability-*,
abseil-*,
-abseil-string-find-str-contains,
bugprone-*,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-inc-dec-in-conditions,
-bugprone-narrowing-conversions,
-bugprone-unchecked-optional-access,
-bugprone-unhandled-exception-at-new,
-bugprone-unused-local-non-trivial-variable,
google-*,
-google-build-using-namespace,
-google-default-arguments,
-google-explicit-constructor,
-google-readability-avoid-underscore-in-googletest-name,
-google-readability-braces-around-statements,
-google-readability-namespace-comments,
-google-readability-todo,
-google-runtime-references,
misc-*,
-misc-const-correctness,
-misc-include-cleaner,
-misc-non-private-member-variables-in-classes,
-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-*
11 changes: 10 additions & 1 deletion deps/opentelemetry-cpp/.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"] },
]

20 changes: 19 additions & 1 deletion deps/opentelemetry-cpp/api/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "int_flag", "string_flag")

package(default_visibility = ["//visibility:public"])

Expand Down Expand Up @@ -35,6 +35,9 @@ cc_library(
":set_cxx_stdlib_2020": ["OPENTELEMETRY_STL_VERSION=2020"],
":set_cxx_stdlib_2023": ["OPENTELEMETRY_STL_VERSION=2023"],
"//conditions:default": [],
}) + select({
":abi_version_no_1": ["OPENTELEMETRY_ABI_VERSION_NO=1"],
":abi_version_no_2": ["OPENTELEMETRY_ABI_VERSION_NO=2"],
}),
strip_include_prefix = "include",
tags = ["api"],
Expand All @@ -61,3 +64,18 @@ bool_flag(
build_setting_default = False,
deprecation = "The value of this flag is ignored. Bazel builds always depend on Abseil for its pre-adopted `std::` types. You should remove this flag from your build command.",
)

int_flag(
name = "abi_version_no",
build_setting_default = 1,
)

config_setting(
name = "abi_version_no_1",
flag_values = {":abi_version_no": "1"},
)

config_setting(
name = "abi_version_no_2",
flag_values = {":abi_version_no": "2"},
)
5 changes: 0 additions & 5 deletions deps/opentelemetry-cpp/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ if(WITH_NO_DEPRECATED_CODE)
INTERFACE OPENTELEMETRY_NO_DEPRECATED_CODE)
endif()

if(WITH_DEPRECATED_SDK_FACTORY)
target_compile_definitions(opentelemetry_api
INTERFACE OPENTELEMETRY_DEPRECATED_SDK_FACTORY)
endif()

if(WITH_ABSEIL)
target_compile_definitions(opentelemetry_api INTERFACE HAVE_ABSEIL)
target_link_libraries(
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
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
31 changes: 31 additions & 0 deletions deps/opentelemetry-cpp/api/include/opentelemetry/common/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,37 @@ point.

#endif

// OPENTELEMETRY_HAVE_EXCEPTIONS
//
// Checks whether the compiler both supports and enables exceptions. Many
// compilers support a "no exceptions" mode that disables exceptions.
//
// Generally, when OPENTELEMETRY_HAVE_EXCEPTIONS is not defined:
//
// * Code using `throw` and `try` may not compile.
// * The `noexcept` specifier will still compile and behave as normal.
// * The `noexcept` operator may still return `false`.
//
// For further details, consult the compiler's documentation.
#ifndef OPENTELEMETRY_HAVE_EXCEPTIONS
# if defined(__clang__) && ((__clang_major__ * 100) + __clang_minor__) < 306
// Clang < 3.6
// http://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html#the-exceptions-macro
# if defined(__EXCEPTIONS) && OPENTELEMETRY_HAVE_FEATURE(cxx_exceptions)
# define OPENTELEMETRY_HAVE_EXCEPTIONS 1
# endif // defined(__EXCEPTIONS) && OPENTELEMETRY_HAVE_FEATURE(cxx_exceptions)
# elif OPENTELEMETRY_HAVE_FEATURE(cxx_exceptions)
# define OPENTELEMETRY_HAVE_EXCEPTIONS 1
// Handle remaining special cases and default to exceptions being supported.
# elif !(defined(__GNUC__) && !defined(__EXCEPTIONS) && !defined(__cpp_exceptions)) && \
!(defined(_MSC_VER) && !defined(_CPPUNWIND))
# define OPENTELEMETRY_HAVE_EXCEPTIONS 1
# endif
#endif
#ifndef OPENTELEMETRY_HAVE_EXCEPTIONS
# define OPENTELEMETRY_HAVE_EXCEPTIONS 0
#endif

/*
OPENTELEMETRY_ATTRIBUTE_LIFETIME_BOUND indicates that a resource owned by a function
parameter or implicit object parameter is retained by the return value of the
Expand Down
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
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
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
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
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

#pragma once

#include <memory>
// IWYU pragma: private, include "opentelemetry/nostd/shared_ptr.h"

#include <memory> // IWYU pragma: export

#include "opentelemetry/version.h"

Expand Down
2 changes: 2 additions & 0 deletions deps/opentelemetry-cpp/api/include/opentelemetry/std/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#pragma once

// IWYU pragma: private, include "opentelemetry/nostd/span.h"

#include "opentelemetry/version.h"

// Standard library implementation requires at least C++17 compiler.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#pragma once

// IWYU pragma: private, include "opentelemetry/nostd/string_view.h"

#include <string_view>

#include "opentelemetry/version.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#pragma once

// IWYU pragma: private, include "opentelemetry/nostd/type_traits.h"

#include <type_traits>

#include "opentelemetry/version.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

#pragma once

#include <memory>
// IWYU pragma: private, include "opentelemetry/nostd/unique_ptr.h"

#include <memory> // IWYU pragma: export

#include "opentelemetry/version.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#pragma once

// IWYU pragma: private, include "opentelemetry/nostd/utility.h"

#include <cstddef>
#include <utility>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#pragma once

// IWYU pragma: private, include "opentelemetry/nostd/variant.h"

#include "opentelemetry/version.h"

#include <cstddef>
Expand Down
10 changes: 8 additions & 2 deletions deps/opentelemetry-cpp/api/include/opentelemetry/trace/noop.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@
// This file is part of the internal implementation of OpenTelemetry. Nothing in this file should be
// used directly. Please refer to span.h and tracer.h for documentation on these interfaces.

#include <memory>
#include <stdint.h>
#include <utility>

#include "opentelemetry/context/runtime_context.h"
#include "opentelemetry/common/attribute_value.h"
#include "opentelemetry/common/key_value_iterable.h"
#include "opentelemetry/common/timestamp.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"
#include "opentelemetry/trace/span.h"
#include "opentelemetry/trace/span_context.h"
#include "opentelemetry/trace/span_context_kv_iterable.h"
#include "opentelemetry/trace/span_metadata.h"
#include "opentelemetry/trace/span_startoptions.h"
#include "opentelemetry/trace/tracer.h"
#include "opentelemetry/trace/tracer_provider.h"
#include "opentelemetry/version.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@

#include <mutex>

#include "opentelemetry/common/macros.h"
#include "opentelemetry/common/spin_lock_mutex.h"
#include "opentelemetry/nostd/shared_ptr.h"
#include "opentelemetry/trace/noop.h"
#include "opentelemetry/trace/tracer_provider.h"
#include "opentelemetry/version.h"

OPENTELEMETRY_BEGIN_NAMESPACE
namespace trace
{

class TracerProvider;

/**
* Stores the singleton global TracerProvider.
*/
Expand Down
Loading
Loading