2020-08-20 20:59:40 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Interpreters/SystemLog.h>
|
2023-04-06 17:00:51 +00:00
|
|
|
#include <Common/OpenTelemetryTraceContext.h>
|
2022-07-07 09:44:19 +00:00
|
|
|
#include <Core/NamesAndTypes.h>
|
|
|
|
#include <Core/NamesAndAliases.h>
|
2024-01-12 15:39:22 +00:00
|
|
|
#include <Storages/ColumnsDescription.h>
|
2020-08-20 20:59:40 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2022-08-25 12:20:13 +00:00
|
|
|
struct OpenTelemetrySpanLogElement : public OpenTelemetry::Span
|
2020-08-20 20:59:40 +00:00
|
|
|
{
|
2020-11-09 15:07:38 +00:00
|
|
|
OpenTelemetrySpanLogElement() = default;
|
2024-02-29 14:56:33 +00:00
|
|
|
explicit OpenTelemetrySpanLogElement(const OpenTelemetry::Span & span)
|
2022-08-25 12:20:13 +00:00
|
|
|
: OpenTelemetry::Span(span) {}
|
2020-11-09 15:07:38 +00:00
|
|
|
|
2020-08-20 20:59:40 +00:00
|
|
|
static std::string name() { return "OpenTelemetrySpanLog"; }
|
2024-01-12 15:39:22 +00:00
|
|
|
|
|
|
|
static ColumnsDescription getColumnsDescription();
|
2021-06-28 11:42:21 +00:00
|
|
|
static NamesAndAliases getNamesAndAliases();
|
2020-08-20 20:59:40 +00:00
|
|
|
void appendToBlock(MutableColumns & columns) const;
|
|
|
|
};
|
|
|
|
|
2023-02-07 23:09:41 +00:00
|
|
|
// OpenTelemetry standardizes some Log data as well, so it's not just
|
2020-08-20 20:59:40 +00:00
|
|
|
// OpenTelemetryLog to avoid confusion.
|
|
|
|
class OpenTelemetrySpanLog : public SystemLog<OpenTelemetrySpanLogElement>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
using SystemLog<OpenTelemetrySpanLogElement>::SystemLog;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|