Skip to content

Commit

Permalink
Merge branch 'open-telemetry:main' into remove_experimental_semconv_1741
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff authored Dec 5, 2022
2 parents 3fb72d5 + 57bf8c2 commit 4d79efd
Show file tree
Hide file tree
Showing 37 changed files with 262 additions and 256 deletions.
1 change: 1 addition & 0 deletions .github/.codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ignore:
- "cmake/**/*"
- "buildscripts/**/*"
- "third_party/**/*"
- "test_common/**/*"
- "tools/**/*"
- ".vscode/**/*"
- ".github/**/*"
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ Increment the:

## [Unreleased]

## [1.8.1] 2022-12-04

* [ETW Exporter] Tail based sampling support [#1780](https://github.com/open-telemetry/opentelemetry-cpp/pull/1780)
* [EXPORTERS] fix typo [affecting otlp exported histogram metrics max uint] [#1827](https://github.com/open-telemetry/opentelemetry-cpp/pull/1827)
* [EXPORTERS] fix enum-compare-switch warning [#1833](https://github.com/open-telemetry/opentelemetry-cpp/pull/1833)
* [METRICS] Change default temporality as "Cumulative" for OTLP metrics
exporters [#1828](https://github.com/open-telemetry/opentelemetry-cpp/pull/1828)
* [BUILD] Moved otlp_grpc_utils.cc to opentelemetry_exporter_otlp_grpc_client.
[#1829](https://github.com/open-telemetry/opentelemetry-cpp/pull/1829)
* Fix type mismatch when move nostd::shared_ptr [#1815](https://github.com/open-telemetry/opentelemetry-cpp/pull/1815)
* [BUILD] Fix Prometheus target name [#1820](https://github.com/open-telemetry/opentelemetry-cpp/pull/1820)
* Clean unused docker files [#1817](https://github.com/open-telemetry/opentelemetry-cpp/pull/1817)
* [BUILD] Fix default bazel build [#1816](https://github.com/open-telemetry/opentelemetry-cpp/pull/1816)
* [BUILD] move client::nosend under test_common [#1811](https://github.com/open-telemetry/opentelemetry-cpp/pull/1811)
* [BUILD] Fix opentelemetry-proto file exists check [#1824](https://github.com/open-telemetry/opentelemetry-cpp/pull/1824)

## [1.8.0] 2022-11-27

* [DOC] Update Metrics status in README.md [#1722](https://github.com/open-telemetry/opentelemetry-cpp/pull/1722)
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,9 @@ if(NOT WITH_API_ONLY)
add_subdirectory(sdk)
add_subdirectory(ext)
add_subdirectory(exporters)
if(BUILD_TESTING)
add_subdirectory(test_common)
endif()
if(WITH_EXAMPLES)
add_subdirectory(examples)
endif()
Expand Down
3 changes: 2 additions & 1 deletion api/include/opentelemetry/nostd/shared_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class shared_ptr
typename std::enable_if<std::is_convertible<pointer, U *>::value>::type * = nullptr>
void MoveTo(typename shared_ptr<U>::PlacementBuffer &buffer) noexcept
{
new (buffer.data) shared_ptr_wrapper{std::move(this->ptr_)};
using other_shared_ptr_wrapper = typename shared_ptr<U>::shared_ptr_wrapper;
new (buffer.data) other_shared_ptr_wrapper{std::move(this->ptr_)};
}

virtual pointer Get() const noexcept { return ptr_.get(); }
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "opentelemetry/detail/preprocessor.h"

#define OPENTELEMETRY_ABI_VERSION_NO 1
#define OPENTELEMETRY_VERSION "1.8.0"
#define OPENTELEMETRY_VERSION "1.8.1"
#define OPENTELEMETRY_ABI_VERSION OPENTELEMETRY_STRINGIFY(OPENTELEMETRY_ABI_VERSION_NO)

// clang-format off
Expand Down
2 changes: 1 addition & 1 deletion cmake/opentelemetry-proto.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#

if(OTELCPP_PROTO_PATH)
if(NOT EXISTS(${OTELCPP_PROTO_PATH}/opentelemetry/proto/common/v1/common.proto))
if(NOT EXISTS "${OTELCPP_PROTO_PATH}/opentelemetry/proto/common/v1/common.proto")
message(FATAL_ERROR "OTELCPP_PROTO_PATH does not point to a opentelemetry-proto repository")
endif()
message(STATUS "opentelemetry-proto dependency satisfied by: external path")
Expand Down
42 changes: 0 additions & 42 deletions docker/ubuntu14.04/Dockerfile

This file was deleted.

38 changes: 0 additions & 38 deletions docker/ubuntu16.04/Dockerfile

This file was deleted.

39 changes: 0 additions & 39 deletions docker/ubuntu18.04/Dockerfile

This file was deleted.

39 changes: 0 additions & 39 deletions docker/ubuntu20.04/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion docs/public/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
author = 'OpenTelemetry authors'

# The full version, including alpha/beta/rc tags
release = "1.8.0"
release = "1.8.1"

# Run sphinx on subprojects and copy output
# -----------------------------------------
Expand Down
10 changes: 10 additions & 0 deletions exporters/etw/include/opentelemetry/exporters/etw/etw_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "opentelemetry//sdk/trace/sampler.h"
#include "opentelemetry/exporters/etw/etw_provider.h"
#include "opentelemetry/exporters/etw/etw_tail_sampler.h"
#include "opentelemetry/sdk/trace/id_generator.h"

OPENTELEMETRY_BEGIN_NAMESPACE
Expand Down Expand Up @@ -166,6 +167,15 @@ sdk::trace::Sampler &GetSampler(T &t)
return *t.sampler_;
}

/**
* @brief Utility function to obtain etw::TracerProvider.tail_sampler_
*/
template <class T>
TailSampler &GetTailSampler(T &t)
{
return *t.tail_sampler_;
}

/**
* @brief Utility template to convert SpanId or TraceId to hex.
* @param id - value of SpanId or TraceId
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
#include "opentelemetry/sdk/trace/sampler.h"
#include "opentelemetry/trace/span.h"

#pragma once
OPENTELEMETRY_BEGIN_NAMESPACE
namespace exporter
{
namespace etw
{

class TailSampler
{
public:
// convert to etw span if required for getters on span.
// auto etw_span = static_cast<const opentelemetry::exporter::etw::Span*>(&span);
// Decision based on
// Span::GetStatus()
// Span::GetProperties()
// Span::GetContext()
virtual opentelemetry::sdk::trace::SamplingResult ShouldSample(
const opentelemetry::trace::Span &span) noexcept = 0;
};

class AlwaysOnTailSampler : public TailSampler
{
public:
opentelemetry::sdk::trace::SamplingResult ShouldSample(
const opentelemetry::trace::Span &span) noexcept override
{
return {opentelemetry::sdk::trace::Decision::RECORD_AND_SAMPLE};
}
};

} // namespace etw
} // namespace exporter
OPENTELEMETRY_END_NAMESPACE
Loading

0 comments on commit 4d79efd

Please sign in to comment.