7#include <smithy/Smithy_EXPORTS.h>
8#include <smithy/tracing/Tracer.h>
9#include <opentelemetry/nostd/shared_ptr.h>
10#include <opentelemetry/trace/tracer.h>
11#include <opentelemetry/trace/span_metadata.h>
12#include <opentelemetry/trace/scope.h>
17 namespace components {
25 opentelemetry::nostd::shared_ptr<opentelemetry::trace::Span> span,
26 opentelemetry::trace::Scope scope) :
27 TraceSpan(std::move(name)), otelSpan(std::move(span)), otelScope(std::move(scope)) {}
40 opentelemetry::trace::StatusCode convertStatusCode(
TraceSpanStatus status);
42 opentelemetry::nostd::shared_ptr<opentelemetry::trace::Span> otelSpan;
43 opentelemetry::trace::Scope otelScope;
51 explicit OtelTracerAdapter(opentelemetry::nostd::shared_ptr<opentelemetry::trace::Tracer> tracer) :
52 otelTracer(std::move(tracer)) {}
59 opentelemetry::trace::SpanKind convertSpanKind(
SpanKind status);
61 opentelemetry::nostd::shared_ptr<opentelemetry::trace::Tracer> otelTracer;
~OtelSpanAdapter() override
void emitEvent(Aws::String name, const Aws::Map< Aws::String, Aws::String > &attributes) override
OtelSpanAdapter(Aws::String name, opentelemetry::nostd::shared_ptr< opentelemetry::trace::Span > span, opentelemetry::trace::Scope scope)
void setStatus(TraceSpanStatus status) override
void setAttribute(Aws::String key, Aws::String value) override
std::shared_ptr< TraceSpan > CreateSpan(Aws::String name, const Aws::Map< Aws::String, Aws::String > &attributes, SpanKind spanKind) override
OtelTracerAdapter(opentelemetry::nostd::shared_ptr< opentelemetry::trace::Tracer > tracer)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String