Skip to content

Commit

Permalink
[BUILD] Fix references to trace namespace to be fully qualified (#2422)
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdandrutu authored Dec 1, 2023
1 parent 064fef0 commit 27a58cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions sdk/include/opentelemetry/sdk/metrics/data/exemplar_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using MetricAttributes = opentelemetry::sdk::common::OrderedAttributeMap;
class ExemplarData
{
public:
static ExemplarData Create(std::shared_ptr<trace::SpanContext> context,
static ExemplarData Create(std::shared_ptr<opentelemetry::trace::SpanContext> context,
const opentelemetry::common::SystemTimestamp &timestamp,
const PointDataAttributes &point_data_attr)
{
Expand All @@ -47,7 +47,7 @@ class ExemplarData
* Returns the SpanContext associated with this exemplar. If the exemplar was not recorded
* inside a sampled trace, the Context will be invalid.
*/
const trace::SpanContext &GetSpanContext() const noexcept { return context_; }
const opentelemetry::trace::SpanContext &GetSpanContext() const noexcept { return context_; }

static PointType CreateSumPointData(ValueType value)
{
Expand All @@ -68,13 +68,13 @@ class ExemplarData
static PointType CreateDropPointData() { return DropPointData{}; }

private:
ExemplarData(std::shared_ptr<trace::SpanContext> context,
ExemplarData(std::shared_ptr<opentelemetry::trace::SpanContext> context,
opentelemetry::common::SystemTimestamp timestamp,
const PointDataAttributes &point_data_attr)
: context_(*context.get()), timestamp_(timestamp), point_data_attr_(point_data_attr)
{}

trace::SpanContext context_;
opentelemetry::trace::SpanContext context_;
opentelemetry::common::SystemTimestamp timestamp_;
PointDataAttributes point_data_attr_;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ class ReservoirCell
auto current_ctx = span->GetContext();
if (current_ctx.IsValid())
{
context_.reset(new trace::SpanContext{current_ctx});
context_.reset(new opentelemetry::trace::SpanContext{current_ctx});
}
}
}

// Cell stores either long or double values, but must not store both
std::shared_ptr<trace::SpanContext> context_;
std::shared_ptr<opentelemetry::trace::SpanContext> context_;
nostd::variant<int64_t, double> value_;
opentelemetry::common::SystemTimestamp record_time_;
MetricAttributes attributes_;
Expand Down

2 comments on commit 27a58cd

@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: 27a58cd Previous: 064fef0 Ratio
BM_SpinLockThrashing/1/process_time/real_time 9.82566313310103 ms/iter 0.09785285432830111 ms/iter 100.41
BM_SpinLockThrashing/2/process_time/real_time 11.998355388641357 ms/iter 0.18025995737098785 ms/iter 66.56
BM_SpinLockThrashing/4/process_time/real_time 14.221403333875868 ms/iter 1.0900187492370605 ms/iter 13.05
BM_ProcYieldSpinLockThrashing/1/process_time/real_time 0.6332042082300726 ms/iter 0.09800685214483303 ms/iter 6.46
BM_ThreadYieldSpinLockThrashing/1/process_time/real_time 28.514575958251953 ms/iter 7.402871784410979 ms/iter 3.85

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 sdk Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 27a58cd Previous: 064fef0 Ratio
BM_BaselineBuffer/1 10620527.267456055 ns/iter 839417.6959991455 ns/iter 12.65
BM_LockFreeBuffer/1 1817536.8309020996 ns/iter 736002.9220581055 ns/iter 2.47
BM_SpanCreation 1108.1121993151398 ns/iter 547.5805621365405 ns/iter 2.02
BM_NoopSpanCreation 308.5546820540028 ns/iter 147.7005144580086 ns/iter 2.09

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

Please sign in to comment.