Skip to content

Commit

Permalink
Merge branch 'main' into cpp-check
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff authored Dec 13, 2023
2 parents 2878f72 + 0b9371d commit 1ceb7e2
Show file tree
Hide file tree
Showing 182 changed files with 4,374 additions and 5,811 deletions.
38 changes: 38 additions & 0 deletions .github/repository-settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Process

This file documents local admin changes for opentelemetry-cpp,
per the community process: https://github.com/open-telemetry/community/blob/main/docs/how-to-configure-new-repository.md

Please note that the EasyCLA check **MUST** stay **REQUIRED**,
it should never be disabled or bypassed, at the risk of tainting the repository.

# Guidelines

The best is to open a PR first that describes the change,
so it can be discussed during review (maybe it is not needed,
maybe there is an alternate solution, ...).

The PR must add a log entry in this file, detailing:

* the date the change is implemented
* what is changed exactly (which setting)
* a short rationale

Admin changes are then applied only when the PR is merged.

If for some reason a change is implemented in emergency,
before a PR can be discussed and merged,
a PR should still be prepared and pushed after the fact to
describe the settings changed.

# Log of local changes

## 2023-11-03

Created log file `.github/repository-settings.md`, since admin permissions are now granted to maintainers.

See https://github.com/open-telemetry/community/issues/1727

No setting changed.


2 changes: 1 addition & 1 deletion .github/workflows/project_management_issue_open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
permissions:
issues: write
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-issue-message: "This issue was marked as stale due to lack of activity."
days-before-issue-stale: 60
Expand Down
110 changes: 110 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,72 @@ Increment the:

## [Unreleased]

* [BUILD] Fix removing of NOMINMAX on Windows
[#2449](https://github.com/open-telemetry/opentelemetry-cpp/pull/2449)

## [1.13.0] 2023-12-06

* [BUILD] Remove WITH_REMOVE_METER_PREVIEW, use WITH_ABI_VERSION_2 instead
[#2370](https://github.com/open-telemetry/opentelemetry-cpp/pull/2370)
* [SDK] Metrics ObservableRegistry Cleanup
[#2376](https://github.com/open-telemetry/opentelemetry-cpp/pull/2376)
* [BUILD] Make WITH_OTLP_HTTP_SSL_PREVIEW mainstream
[#2378](https://github.com/open-telemetry/opentelemetry-cpp/pull/2378)
* [SDK] Creating DoubleUpDownCounter with no matching view
[#2379](https://github.com/open-telemetry/opentelemetry-cpp/pull/2379)
* [API] Add InstrumentationScope attributes in TracerProvider::GetTracer()
[#2371](https://github.com/open-telemetry/opentelemetry-cpp/pull/2371)
* [BUILD] DLL export interface for Metrics
[#2344](https://github.com/open-telemetry/opentelemetry-cpp/pull/2344)
* [BUILD] enum CanonicalCode names too generic... conflict with old C defines
[#2385](https://github.com/open-telemetry/opentelemetry-cpp/pull/2385)
* [BUILD] Fix cpack broken package version
[#2386](https://github.com/open-telemetry/opentelemetry-cpp/pull/2386)
* [API] Add a new AddLink() operation to Span
[#2380](https://github.com/open-telemetry/opentelemetry-cpp/pull/2380)
* [opentracing-shim] Add check for sampled context
[#2390](https://github.com/open-telemetry/opentelemetry-cpp/pull/2390)
* [BUILD] Fix exported definitions when building DLL with STL
[#2387](https://github.com/open-telemetry/opentelemetry-cpp/pull/2387)
* [BUILD] Add missing includes to runtime_context_test
[#2395](https://github.com/open-telemetry/opentelemetry-cpp/pull/2395)
* [ADMIN] Add file .github/repository-settings.md
[#2392](https://github.com/open-telemetry/opentelemetry-cpp/pull/2392)
* [SDK] Fix GetLogger with empty library name
[#2398](https://github.com/open-telemetry/opentelemetry-cpp/pull/2398)
* [TEST] Fix compiling problem and removed -DENABLE_TEST
[#2401](https://github.com/open-telemetry/opentelemetry-cpp/pull/2401)
* [BUILD] Check windows options are not passed to non-Windows build
[#2399](https://github.com/open-telemetry/opentelemetry-cpp/pull/2399)
* [EXPORTER] Rework OTLP/HTTP and OTLP/GRPC exporter options
[#2388](https://github.com/open-telemetry/opentelemetry-cpp/pull/2388)
* [Build] Update vcpkg to latest release
[#2412](https://github.com/open-telemetry/opentelemetry-cpp/pull/2412)
* [SDK] Cardinality limits for metrics streams
(Sync Instruments + Delta Temporality)
[#2255](https://github.com/open-telemetry/opentelemetry-cpp/pull/2255)
* [EXPORTER] Prometheus: Add unit to names, convert to word
[#2213](https://github.com/open-telemetry/opentelemetry-cpp/pull/2213)
* [Metrics] Make context optional for histogram instruments in Metrics SDK
[#2416](https://github.com/open-telemetry/opentelemetry-cpp/pull/2416)
* [BUILD] Fix references to trace namespace to be fully qualified
[#2422](https://github.com/open-telemetry/opentelemetry-cpp/pull/2422)
* [BUILD] Bump third_party/googletest to same version as bazel
[#2421](https://github.com/open-telemetry/opentelemetry-cpp/pull/2421)
* [BUILD] Remove defining NOMINMAX from api
[#2420](https://github.com/open-telemetry/opentelemetry-cpp/pull/2420)
* [BUILD] 'uint8_t' not declared in this scope with gcc 13.2.1
[#2423](https://github.com/open-telemetry/opentelemetry-cpp/pull/2423)
* [BUILD] Improve the handling of OPENTELEMETRY_HAVE_WORKING_REGEX
[#2430](https://github.com/open-telemetry/opentelemetry-cpp/pull/2430)
* [SEMANTIC CONVENTION] Upgrade to semconv 1.23.1
[#2428](https://github.com/open-telemetry/opentelemetry-cpp/pull/2428)
* [BUILD] Use fully qualified references to trace/common namespace
[#2424](https://github.com/open-telemetry/opentelemetry-cpp/pull/2424)
* [API] Create root span with active span
[#2427](https://github.com/open-telemetry/opentelemetry-cpp/pull/2427)
* [REMOVAL] Remove ZPAGES
[#2433](https://github.com/open-telemetry/opentelemetry-cpp/pull/2433)

Important changes:

Expand All @@ -32,6 +92,15 @@ Important changes:
* When building with `CMake` option `WITH_ABI_VERSION_1=ON` (by default)
the `ABI` is unchanged, and the fix is not available.

* [API] Add a new AddLink() operation to Span
[#2380](https://github.com/open-telemetry/opentelemetry-cpp/pull/2380)
* New `API` Span::AddLink() adds a single link to a span.
* New `API` Span::AddLinks() adds multiple links to a span.
* Because this is an `ABI` breaking change, the fix is only available
with the `CMake` option `WITH_ABI_VERSION_2=ON`.
* When building with `CMake` option `WITH_ABI_VERSION_1=ON` (by default)
the `ABI` is unchanged, and the fix is not available.

* [BUILD] Make WITH_OTLP_HTTP_SSL_PREVIEW mainstream
[#2378](https://github.com/open-telemetry/opentelemetry-cpp/pull/2378)
* The experimental `CMake` option `WITH_OTLP_HTTP_SSL_PREVIEW`
Expand All @@ -41,13 +110,54 @@ Important changes:
* These build options are scheduled to be removed by the next release,
building without SSL/TLS will no longer be possible.

* [EXPORTER] Rework OTLP/HTTP and OTLP/GRPC exporter options
[#2388](https://github.com/open-telemetry/opentelemetry-cpp/pull/2388)
* `OtlpGrpcMetricExporterOptions` used to honor `_TRACES_`
environment variables, instead of `_METRICS_` environment variables.
* The implementation of `OtlpGrpcMetricExporterOptions` is now fixed.
* Please check configuration variables,
to make sure `_METRICS_` variables are set as expected.

Breaking changes:

* [BUILD] Remove WITH_REMOVE_METER_PREVIEW, use WITH_ABI_VERSION_2 instead
[#2370](https://github.com/open-telemetry/opentelemetry-cpp/pull/2370)
* The experimental `CMake` option `WITH_REMOVE_METER_PREVIEW` is removed,
use option `WITH_ABI_VERSION_2` instead.

* [BUILD] enum CanonicalCode names too generic... conflict with old C defines
[#2385](https://github.com/open-telemetry/opentelemetry-cpp/pull/2385)
* Header file `opentelemetry/trace/canonical_code.h` is unused,
and is now removed.
* This header should not be included directly in an application.
If this is the case, please remove any remaining include directives.

* [BUILD] Fix exported definitions when building DLL with STL
[#2387](https://github.com/open-telemetry/opentelemetry-cpp/pull/2387)
* The MeterSelector, MeterSelectorFactory, InstrumentSelector,
and InstrumentSelectorFactory APIs now use const std::string&
instead of nostd::string_view for name, version and schema to
maintain a single export definition for DLL.

* [EXPORTER] Rework OTLP/HTTP and OTLP/GRPC exporter options
[#2388](https://github.com/open-telemetry/opentelemetry-cpp/pull/2388)
* `OtlpGrpcLogRecordExporter` incorrectly used `OtlpGrpcExporterOptions`,
which are options for traces and not logs.
* This created a bug: the `OtlpGrpcLogRecordExporter` honors `_TRACES_`
environment variables, instead of `_LOGS_` environment variables.
* `OtlpGrpcLogRecordExporter` is changed to use
`OtlpGrpcLogRecordExporterOptions` instead, fixing the bug.
* User code that initializes the SDK with a GRPC Log exporter,
and uses exporter options, should adjust to replace
`OtlpGrpcExporterOptions` with `OtlpGrpcLogRecordExporterOptions`.
* Please check configuration variables,
to make sure `_LOGS_` variables are set as expected.

* [REMOVAL] Remove ZPAGES
[#2433](https://github.com/open-telemetry/opentelemetry-cpp/pull/2433)
* As announced in release 1.12.0,
the deprecated ZPAGES exporter is now removed.

## [1.12.0] 2023-10-16

* [BUILD] Support `pkg-config`
Expand Down
30 changes: 11 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,6 @@ option(WITH_PROMETHEUS "Whether to include the Prometheus Client in the SDK"
option(WITH_ELASTICSEARCH
"Whether to include the Elasticsearch Client in the SDK" OFF)

option(WITH_ZPAGES
"DEPRECATED - Whether to include the Zpages Server in the SDK" OFF)

option(WITH_NO_GETENV "Whether the platform supports environment variables" OFF)

option(BUILD_TESTING "Whether to enable tests" ON)
Expand Down Expand Up @@ -248,6 +245,10 @@ set(OTELCPP_PROTO_PATH

if(WIN32)
option(WITH_ETW "Whether to include the ETW Exporter in the SDK" ON)
else()
if(DEFINED (WITH_ETW))
message(FATAL_ERROR "WITH_ETW is only supported on Windows")
endif()
endif(WIN32)

# Do not convert deprecated message to error
Expand Down Expand Up @@ -286,14 +287,6 @@ option(WITH_OTLP_HTTP_SSL_TLS_PREVIEW
option(WITH_METRICS_EXEMPLAR_PREVIEW
"Whether to enable exemplar within metrics" OFF)

if(WITH_ZPAGES)
if(WITH_NO_DEPRECATED_CODE)
message(FATAL_ERROR "WITH_ZPAGES is DEPRECATED.")
else()
message(WARNING "WITH_ZPAGES is DEPRECATED.")
endif()
endif()

#
# Verify options dependencies
#
Expand Down Expand Up @@ -476,7 +469,6 @@ endif()
if(WITH_ELASTICSEARCH
OR WITH_ZIPKIN
OR WITH_OTLP_HTTP
OR WITH_ZPAGES
OR BUILD_W3CTRACECONTEXT_TEST
OR WITH_ETW)
set(USE_NLOHMANN_JSON ON)
Expand Down Expand Up @@ -579,20 +571,17 @@ list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}")

include(CTest)
if(BUILD_TESTING)
add_definitions(-DENABLE_TEST)
if(EXISTS ${CMAKE_BINARY_DIR}/lib/libgtest.a)
# Prefer GTest from build tree. GTest is not always working with
# CMAKE_PREFIX_PATH
set(GTEST_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googletest/include
${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googlemock/include)
if(TARGET gtest)
set(GTEST_BOTH_LIBRARIES gtest gtest_main gmock)
set(GTEST_BOTH_LIBRARIES gtest gtest_main)
else()
set(GTEST_BOTH_LIBRARIES
${CMAKE_BINARY_DIR}/lib/libgtest.a
${CMAKE_BINARY_DIR}/lib/libgtest_main.a
${CMAKE_BINARY_DIR}/lib/libgmock.a)
set(GTEST_BOTH_LIBRARIES ${CMAKE_BINARY_DIR}/lib/libgtest.a
${CMAKE_BINARY_DIR}/lib/libgtest_main.a)
endif()
elseif(WIN32)
# Make sure we are always bootsrapped with vcpkg on Windows
Expand All @@ -609,7 +598,7 @@ if(BUILD_TESTING)
if(NOT GTEST_BOTH_LIBRARIES)
# New GTest package names
if(TARGET GTest::gtest)
set(GTEST_BOTH_LIBRARIES GTest::gtest GTest::gtest_main GTest::gmock)
set(GTEST_BOTH_LIBRARIES GTest::gtest GTest::gtest_main)
elseif(TARGET GTest::GTest)
set(GTEST_BOTH_LIBRARIES GTest::GTest GTest::Main)
endif()
Expand All @@ -629,6 +618,9 @@ endif()
include(CMakePackageConfigHelpers)

if(DEFINED OPENTELEMETRY_BUILD_DLL)
if(NOT WIN32)
message(FATAL_ERROR "Build DLL is only supported on Windows!")
endif()
if(NOT MSVC)
message(WARNING "Build DLL is supposed to work with MSVC!")
endif()
Expand Down
84 changes: 1 addition & 83 deletions DEPRECATED.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,89 +92,7 @@ N/A

## [opentelemetry-cpp Exporter]

### ZPages exporter

#### Announcement (ZPages)

* Version: 1.11.0
* Date: 2023-09-01
* PR: [DEPRECATION] Deprecate ZPAGES
[#2291](https://github.com/open-telemetry/opentelemetry-cpp/pull/2291)

#### Motivation (ZPages)

The ZPages specification itself was introduced in 2020,
and has been experimental ever since,
not getting a lot of attention, and never reaching a stable status.

Several other opentelemetry projects have implemented support for zpages,
only to later deprecate and then remove the zpages implementation (Java,
C#), abandoning the zpages feature.

In this context, it does not make sense to continue to maintain the zpages
code in opentelemetry-cpp.

#### Scope (ZPages)

The following are deprecated and planned for removal:

* all the API headers located under
`ext/include/opentelemetry/ext/zpages/`, including:
* the C++ class `ThreadsafeSpanData`
* the C++ class `TracezDataAggregator`
* the C++ class `TracezHttpServer`
* the C++ class `TracezSpanProcessor`
* the C++ class `TracezSharedData`
* the C++ class `ZPages`
* the C++ class `zPagesHttpServer`
* all the code and doc located under `ext/src/zpages/`
* all the tests located under `ext/test/zpages/`
* the zpages exporter library(`opentelemetry_zpages`)
* the zpages build options in CMake (`WITH_ZPAGES`)

The following code is no longer considered public, will no longer be
installed, and will no longer be useable outside of
the opentelemetry-cpp implementation:

* all the API headers located under
`ext/include/opentelemetry/ext/http/server`, including:
* the C++ class `FileHttpServer`
* the C++ class `HttpRequestCallback`
* the C++ class `HttpServer`
* the C++ class `HttpRequestHandler`
* the C++ class `SocketCallback`

This implementation of an HTTP server is meant to be used for testing only,
it is not production ready.

#### Mitigation (ZPages)

Consider using a different exporter,
for example the OTLP exporter (both OTLP HTTP and OTLP GRPC are supported),
to expose trace data to a separate trace backend.

Note that this changes the access pattern:

* with zpages, data is only available locally (in process)
* with other exporters, data is available externally (not in process)

Our assessment is that the zpages implementation is no longer in use,
and can be removed.

If that assessment is incorrect (i.e., if you own a project that depends
on the zpage exporter from opentelemetry-cpp), please comment on the
removal issue
[#2292](https://github.com/open-telemetry/opentelemetry-cpp/issues/2292).

An alternative to zpage removal is to move the code to the
opentelemetry-cpp-contrib github
[repository](https://github.com/open-telemetry/opentelemetry-cpp-contrib).

Contributions to migrate the code, and maintain zpages, are welcome.

#### Planned removal (ZPages)

* Date: December, 2023
N/A

## [Documentation]

Expand Down
4 changes: 0 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ You can link OpenTelemetry C++ SDK with libraries provided in
-- Installing: /<install-root>/lib/cmake/opentelemetry-cpp/opentelemetry-cpp-config.cmake
-- Installing: /<install-root>/lib/cmake/opentelemetry-cpp/opentelemetry-cpp-config-version.cmake
...
-- Installing: /<install-root>/include/opentelemetry//ext/zpages/static/tracez_index.h
-- Installing: /<install-root>/include/opentelemetry//ext/zpages/static/tracez_style.h
-- Installing: /<install-root>/include/opentelemetry//ext/zpages/threadsafe_span_data.h
-- Installing: /<install-root>/lib/libopentelemetry_zpages.a
$
```

Expand Down
1 change: 0 additions & 1 deletion api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ if(WITH_NO_GETENV)
endif()

if(WIN32)
target_compile_definitions(opentelemetry_api INTERFACE NOMINMAX)
if(WITH_ETW)
target_compile_definitions(opentelemetry_api INTERFACE HAVE_MSGPACK)
endif()
Expand Down
Loading

0 comments on commit 1ceb7e2

Please sign in to comment.