ClickHouse/src/Interpreters/OpenTelemetrySpanLog.h
2024-02-29 15:40:30 +00:00

34 lines
938 B
C++

#pragma once
#include <Interpreters/SystemLog.h>
#include <Common/OpenTelemetryTraceContext.h>
#include <Core/NamesAndTypes.h>
#include <Core/NamesAndAliases.h>
#include <Storages/ColumnsDescription.h>
namespace DB
{
struct OpenTelemetrySpanLogElement : public OpenTelemetry::Span
{
OpenTelemetrySpanLogElement() = default;
explicit OpenTelemetrySpanLogElement(const OpenTelemetry::Span & span)
: OpenTelemetry::Span(span) {}
static std::string name() { return "OpenTelemetrySpanLog"; }
static ColumnsDescription getColumnsDescription();
static NamesAndAliases getNamesAndAliases();
void appendToBlock(MutableColumns & columns) const;
};
// OpenTelemetry standardizes some Log data as well, so it's not just
// OpenTelemetryLog to avoid confusion.
class OpenTelemetrySpanLog : public SystemLog<OpenTelemetrySpanLogElement>
{
public:
using SystemLog<OpenTelemetrySpanLogElement>::SystemLog;
};
}