Skip to content

Commit

Permalink
[BUILD] enum CanonicalCode names too generic... conflict with old C d…
Browse files Browse the repository at this point in the history
…efines (#2385)
  • Loading branch information
marcalff authored Oct 24, 2023
1 parent 045be9c commit 0baf501
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 149 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Increment the:
[#2378](https://github.com/open-telemetry/opentelemetry-cpp/pull/2378)
* [API] Add InstrumentationScope attributes in TracerProvider::GetTracer()
[#2371](https://github.com/open-telemetry/opentelemetry-cpp/pull/2371)
* [BUILD] enum CanonicalCode names too generic... conflict with old C defines
[#2385](https://github.com/open-telemetry/opentelemetry-cpp/pull/2385)

Important changes:

Expand Down Expand Up @@ -48,6 +50,13 @@ Breaking changes:
* 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.

## [1.12.0] 2023-10-16

* [BUILD] Support `pkg-config`
Expand Down
141 changes: 0 additions & 141 deletions api/include/opentelemetry/trace/canonical_code.h

This file was deleted.

1 change: 0 additions & 1 deletion api/include/opentelemetry/trace/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "opentelemetry/nostd/span.h"
#include "opentelemetry/nostd/string_view.h"
#include "opentelemetry/nostd/type_traits.h"
#include "opentelemetry/trace/canonical_code.h"
#include "opentelemetry/trace/span_context.h"
#include "opentelemetry/trace/span_metadata.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class OStreamSpanExporter final : public opentelemetry::sdk::trace::SpanExporter
mutable opentelemetry::common::SpinLockMutex lock_;
bool isShutdown() const noexcept;

// Mapping status number to the string from api/include/opentelemetry/trace/canonical_code.h
// Mapping status number to the string from api/include/opentelemetry/trace/span_metadata.h
std::map<int, std::string> statusMap{{0, "Unset"}, {1, "Ok"}, {2, "Error"}};

// various print helpers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "opentelemetry/nostd/string_view.h"
#include "opentelemetry/sdk/trace/recordable.h"
#include "opentelemetry/sdk/trace/span_data.h"
#include "opentelemetry/trace/canonical_code.h"
#include "opentelemetry/trace/span.h"
#include "opentelemetry/trace/span_id.h"
#include "opentelemetry/trace/trace_id.h"
Expand Down
2 changes: 0 additions & 2 deletions ext/include/opentelemetry/ext/zpages/tracez_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
#include "opentelemetry/nostd/span.h"
#include "opentelemetry/nostd/string_view.h"
#include "opentelemetry/sdk/trace/span_data.h"
#include "opentelemetry/trace/canonical_code.h"
#include "opentelemetry/trace/span_id.h"
#include "opentelemetry/trace/trace_id.h"
#include "opentelemetry/version.h"

using opentelemetry::ext::zpages::ThreadsafeSpanData;
using opentelemetry::trace::CanonicalCode;
using opentelemetry::trace::SpanId;
using opentelemetry::trace::TraceId;

Expand Down
3 changes: 0 additions & 3 deletions ext/include/opentelemetry/ext/zpages/tracez_data_aggregator.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
#include "opentelemetry/nostd/span.h"
#include "opentelemetry/nostd/string_view.h"
#include "opentelemetry/sdk/trace/span_data.h"
#include "opentelemetry/trace/canonical_code.h"

using opentelemetry::trace::CanonicalCode;

OPENTELEMETRY_BEGIN_NAMESPACE
namespace ext
Expand Down

2 comments on commit 0baf501

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp sdk Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 0baf501 Previous: 045be9c Ratio
BM_BaselineBuffer/2 18067996.501922607 ns/iter 3532037.7349853516 ns/iter 5.12
BM_LockFreeBuffer/2 4167978.7744011353 ns/iter 1233421.802520752 ns/iter 3.38

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp api Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 0baf501 Previous: 045be9c Ratio
BM_SpanCreation 38.14734052285918 ns/iter 17.19510659179467 ns/iter 2.22

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.