forked from open-telemetry/opentelemetry-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtracez_processor.cc
More file actions
28 lines (23 loc) · 808 Bytes
/
tracez_processor.cc
File metadata and controls
28 lines (23 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
#include "opentelemetry/ext/zpages/tracez_processor.h"
OPENTELEMETRY_BEGIN_NAMESPACE
namespace ext
{
namespace zpages
{
namespace trace_sdk = opentelemetry::sdk::trace;
void TracezSpanProcessor::OnStart(trace_sdk::Recordable &span,
const opentelemetry::trace::SpanContext &
/* parent_context */) noexcept
{
shared_data_->OnStart(static_cast<ThreadsafeSpanData *>(&span));
}
void TracezSpanProcessor::OnEnd(std::unique_ptr<trace_sdk::Recordable> &&span) noexcept
{
shared_data_->OnEnd(
std::unique_ptr<ThreadsafeSpanData>(static_cast<ThreadsafeSpanData *>(span.release())));
}
} // namespace zpages
} // namespace ext
OPENTELEMETRY_END_NAMESPACE