Skip to content

Commit

Permalink
Merge branch 'main' into gRPC-latest
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Sep 24, 2022
2 parents cb64d1a + 5c180a1 commit b2e82b6
Show file tree
Hide file tree
Showing 52 changed files with 458 additions and 213 deletions.
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@v5
- uses: actions/stale@v6
with:
stale-issue-message: "This issue was marked as stale due to lack of activity."
days-before-issue-stale: 60
Expand Down
35 changes: 33 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,42 @@ Increment the:

## [Unreleased]

## [1.6.1] 2022-09-22

* [BUILD] Upgrade opentelemetry-proto to v0.19.0 [#1579](https://github.com/open-telemetry/opentelemetry-cpp/pull/1579)
* [METRICS EXPORTER] Add `OtlpGrpcMetricExporterFactory` and `OtlpHttpMetricExporterFactory`.
[#1606](https://github.com/open-telemetry/opentelemetry-cpp/pull/1606)
* [METRICS EXPORTER] Add `OtlpGrpcClient` [#1606](https://github.com/open-telemetry/opentelemetry-cpp/pull/1606)
* [BUILD] Fix header only api singletons [#1604](https://github.com/open-telemetry/opentelemetry-cpp/pull/1604)
* [SEMANTIC CONVENTIONS] Upgrade to version 1.13.0 [#1624](https://github.com/open-telemetry/opentelemetry-cpp/pull/1624)
* [BUILD] Fixes span creation benchmark issue. [#1622](https://github.com/open-telemetry/opentelemetry-cpp/pull/1622)
* [BUILD] Fix more build warnings (#1616) [#1620](https://github.com/open-telemetry/opentelemetry-cpp/pull/1620)
* [SDK gRPC]: Fix out-of-bounds access of string_view in GrpcClientCarrier in
the example
[#1619](https://github.com/open-telemetry/opentelemetry-cpp/pull/1619)
* [EXPORTER ETW] Add Trace flags in SpanContext [#1618](https://github.com/open-telemetry/opentelemetry-cpp/pull/1618)
* [SDK] resource sdk: Update Resource::Merge function docs [#1615](https://github.com/open-telemetry/opentelemetry-cpp/pull/1615)
* [BUILD] Fix build warnings [#1613](https://github.com/open-telemetry/opentelemetry-cpp/pull/1613)
* [API BUILD] Fix header only api singletons (#1520) [#1604](https://github.com/open-telemetry/opentelemetry-cpp/pull/1604)
* [METRICS SDK] Fix default value of
`OtlpHttpMetricExporterOptions::aggregation_temporality`.
[#1601](https://github.com/open-telemetry/opentelemetry-cpp/pull/1601)
* [METRICS EXAMPLE] Example for OTLP gRPC exporter for Metrics. [#1598](https://github.com/open-telemetry/opentelemetry-cpp/pull/1598)
* [SDK] Fix `LoggerContext::Shutdown` and tsan of `OtlpHttpClient` [#1592](https://github.com/open-telemetry/opentelemetry-cpp/pull/1592)
* [METRICS SDK] Fix 1585 - Multiple cumulative metric collections without
measurement recording.
[#1586](https://github.com/open-telemetry/opentelemetry-cpp/pull/1586)
* [BUILD] metrics warnings [#1583](https://github.com/open-telemetry/opentelemetry-cpp/pull/1583)
* [METRICS SDK] Fix ObservableInstrument::RemoveCallback [#1582](https://github.com/open-telemetry/opentelemetry-cpp/pull/1582)
* [SDK] Add error log when getting a http error code [#1581](https://github.com/open-telemetry/opentelemetry-cpp/pull/1581)
* [EXPORTER] ETW Exporter - Add support for Sampler and ID Generator [#1547](https://github.com/open-telemetry/opentelemetry-cpp/pull/1547)

Notes:

While [OpenTelemetry sememantic
convention](https://github.com/open-telemetry/opentelemetry-specification/tree/main/semantic_conventions)
is still in experimental state, PR
[#1624](https://github.com/open-telemetry/opentelemetry-cpp/pull/1624) upgraded
it from 1.12.0 to 1.13.0 which **MAY** break the instrumentation library. Please
update the sementic convention in instruementation library is needed.

## [1.6.0] 2022-08-15

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ along with build files for CMake and Bazel.
See [CONTRIBUTING.md](CONTRIBUTING.md)

We meet weekly, and the time of the meeting alternates between Monday at 13:00
PT and Wednesday at 10:00 PT. The meeting is subject to change depending on
PT and Wednesday at 9:00 PT. The meeting is subject to change depending on
contributors' availability. Check the [OpenTelemetry community
calendar](https://calendar.google.com/calendar/embed?src=google.com_b79e3e90j7bbsa2n2p5an5lf60%40group.calendar.google.com)
for specific dates and Zoom meeting links.
Expand Down
2 changes: 1 addition & 1 deletion api/include/opentelemetry/context/runtime_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Token
public:
bool operator==(const Context &other) const noexcept { return context_ == other; }

~Token();
~Token() noexcept;

private:
friend class RuntimeContextStorage;
Expand Down
10 changes: 10 additions & 0 deletions api/include/opentelemetry/logs/noop.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ class NoopLogger final : public Logger
trace::TraceFlags /* trace_flags */,
common::SystemTimestamp /* timestamp */) noexcept override
{}

void Log(Severity /* severity */,
nostd::string_view /* name */,
nostd::string_view /* body */,
const common::KeyValueIterable & /* attributes */,
trace::TraceId /* trace_id */,
trace::SpanId /* span_id */,
trace::TraceFlags /* trace_flags */,
common::SystemTimestamp /* timestamp */) noexcept override
{}
};

/**
Expand Down
3 changes: 3 additions & 0 deletions api/include/opentelemetry/metrics/async_instruments.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ using ObservableCallbackPtr = void (*)(ObserverResult, void *);
class ObservableInstrument
{
public:
ObservableInstrument() = default;
virtual ~ObservableInstrument() = default;

/**
* Sets up a function that will be called whenever a metric collection is initiated.
*/
Expand Down
1 change: 1 addition & 0 deletions api/include/opentelemetry/metrics/noop.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class NoopUpDownCounter : public UpDownCounter<T>
nostd::string_view /* description */,
nostd::string_view /* unit */) noexcept
{}
~NoopUpDownCounter() = default;
void Add(T /* value */) noexcept override {}
void Add(T /* value */, const opentelemetry::context::Context & /* context */) noexcept override
{}
Expand Down
2 changes: 2 additions & 0 deletions api/include/opentelemetry/metrics/observer_result.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class ObserverResultT
{

public:
virtual ~ObserverResultT() = default;

virtual void Observe(T value) noexcept = 0;

virtual void Observe(T value, const common::KeyValueIterable &attributes) noexcept = 0;
Expand Down
6 changes: 5 additions & 1 deletion api/include/opentelemetry/metrics/sync_instruments.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ namespace metrics
{

class SynchronousInstrument
{};
{
public:
SynchronousInstrument() = default;
virtual ~SynchronousInstrument() = default;
};

template <class T>
class Counter : public SynchronousInstrument
Expand Down
23 changes: 12 additions & 11 deletions api/include/opentelemetry/nostd/detail/invoke.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,25 @@ inline constexpr auto invoke_impl(R T::*f, Arg &&arg, Args &&... args)
#endif
} // namespace detail

/* clang-format off */
template <typename F, typename... Args>
inline constexpr auto invoke(F &&f, Args &&... args)
OPENTELEMETRY_RETURN(detail::invoke_impl(std::forward<F>(f), std::forward<Args>(args)...));
OPENTELEMETRY_RETURN(detail::invoke_impl(std::forward<F>(f), std::forward<Args>(args)...))

namespace detail
/* clang-format on */
{

template <typename Void, typename, typename...>
struct invoke_result
{};
template <typename Void, typename, typename...>
struct invoke_result
{};

template <typename F, typename... Args>
struct invoke_result<void_t<decltype(nostd::invoke(std::declval<F>(), std::declval<Args>()...))>,
F,
Args...>
{
using type = decltype(nostd::invoke(std::declval<F>(), std::declval<Args>()...));
};
template <typename F, typename... Args>
struct invoke_result<void_t<decltype(nostd::invoke(std::declval<F>(), std::declval<Args>()...))>,
F, Args...>
{
using type = decltype(nostd::invoke(std::declval<F>(), std::declval<Args>()...));
};

} // namespace detail

Expand Down
6 changes: 6 additions & 0 deletions api/include/opentelemetry/plugin/tracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ class Span final : public trace::Span
span_->AddEvent(name, timestamp);
}

void AddEvent(nostd::string_view name,
const common::KeyValueIterable &attributes) noexcept override
{
span_->AddEvent(name, attributes);
}

void AddEvent(nostd::string_view name,
common::SystemTimestamp timestamp,
const common::KeyValueIterable &attributes) noexcept override
Expand Down
29 changes: 15 additions & 14 deletions api/include/opentelemetry/trace/default_span.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,34 @@ class DefaultSpan : public Span
// Returns an invalid span.
static DefaultSpan GetInvalid() { return DefaultSpan(SpanContext::GetInvalid()); }

trace::SpanContext GetContext() const noexcept { return span_context_; }
trace::SpanContext GetContext() const noexcept override { return span_context_; }

bool IsRecording() const noexcept { return false; }
bool IsRecording() const noexcept override { return false; }

void SetAttribute(nostd::string_view /* key */,
const common::AttributeValue & /* value */) noexcept
const common::AttributeValue & /* value */) noexcept override
{}

void AddEvent(nostd::string_view /* name */) noexcept {}
void AddEvent(nostd::string_view /* name */) noexcept override {}

void AddEvent(nostd::string_view /* name */, common::SystemTimestamp /* timestamp */) noexcept {}
void AddEvent(nostd::string_view /* name */,
common::SystemTimestamp /* timestamp */) noexcept override
{}

void AddEvent(nostd::string_view /* name */,
common::SystemTimestamp /* timestamp */,
const common::KeyValueIterable & /* attributes */) noexcept
const common::KeyValueIterable & /* attributes */) noexcept override
{}

void AddEvent(nostd::string_view name, const common::KeyValueIterable &attributes) noexcept
{
this->AddEvent(name, std::chrono::system_clock::now(), attributes);
}
void AddEvent(nostd::string_view /* name */,
common::SystemTimestamp /* timestamp */,
const common::KeyValueIterable & /* attributes */) noexcept override
{}

void SetStatus(StatusCode /* status */, nostd::string_view /* description */) noexcept {}
void SetStatus(StatusCode /* status */, nostd::string_view /* description */) noexcept override {}

void UpdateName(nostd::string_view /* name */) noexcept {}
void UpdateName(nostd::string_view /* name */) noexcept override {}

void End(const EndSpanOptions & /* options */ = {}) noexcept {}
void End(const EndSpanOptions & /* options */) noexcept override {}

nostd::string_view ToString() const noexcept { return "DefaultSpan"; }

Expand Down
4 changes: 4 additions & 0 deletions api/include/opentelemetry/trace/noop.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ class NoopSpan final : public Span
common::SystemTimestamp /*timestamp*/) noexcept override
{}

void AddEvent(nostd::string_view /* name */,
const common::KeyValueIterable & /* attributes */) noexcept override
{}

void AddEvent(nostd::string_view /*name*/,
common::SystemTimestamp /*timestamp*/,
const common::KeyValueIterable & /*attributes*/) noexcept override
Expand Down
Loading

0 comments on commit b2e82b6

Please sign in to comment.