Skip to content

Commit

Permalink
Chore
Browse files Browse the repository at this point in the history
  • Loading branch information
nepridumalnik committed Jan 16, 2025
1 parent 9a47d54 commit 744a63f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
1 change: 0 additions & 1 deletion core/src/tracing/span.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ void Span::Impl::PutIntoLogger(logging::impl::TagWriter writer) && {
}
writer.PutLogExtra(log_extra_inheritable_);

LogEvents(writer);
LogOpenTracing();
}

Expand Down
1 change: 0 additions & 1 deletion core/src/tracing/span_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class Span::Impl : public boost::intrusive::list_base_hook<boost::intrusive::lin
void AttachToCoroStack();

private:
void LogEvents(logging::impl::TagWriter& writer) const;
void LogOpenTracing() const;
void DoLogOpenTracing(logging::impl::TagWriter writer) const;
static void AddOpentracingTags(formats::json::StringBuilder& output, const logging::LogExtra& input);
Expand Down
24 changes: 10 additions & 14 deletions core/src/tracing/span_opentracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,24 +122,20 @@ void Span::Impl::DoLogOpenTracing(logging::impl::TagWriter writer) const {
}
}
writer.PutTag("tags", tags.GetStringView());
}

void Span::Impl::LogEvents(logging::impl::TagWriter& writer) const {
if (events_.empty()) {
return;
}
if (!events_.empty()) {
formats::json::StringBuilder events;
{
const formats::json::StringBuilder::ObjectGuard event_guard(events);

formats::json::StringBuilder events;
{
const formats::json::StringBuilder::ObjectGuard event_guard(events);

for (const auto& event : events_) {
events.Key(event.name);
events.WriteUInt64(event.time_unix_nano);
for (const auto& event : events_) {
events.Key(event.name);
events.WriteUInt64(event.time_unix_nano);
}
}
}

writer.PutTag("events", events.GetStringView());
writer.PutTag("events", events.GetStringView());
}
}

void Span::Impl::AddOpentracingTags(formats::json::StringBuilder& output, const logging::LogExtra& input) {
Expand Down
1 change: 0 additions & 1 deletion otlp/src/otlp/logs/component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ LoggerComponent::LoggerComponent(const components::ComponentConfig& config, cons
logger_config.extra_attributes = config["extra-attributes"].As<std::unordered_map<std::string, std::string>>({});
logger_config.attributes_mapping =
config["attributes-mapping"].As<std::unordered_map<std::string, std::string>>({});

logger_config.logs_sink = config["sinks"]["logs"].As<SinkType>(SinkType::kOtlp);
logger_config.tracing_sink = config["sinks"]["tracing"].As<SinkType>(SinkType::kOtlp);

Expand Down

0 comments on commit 744a63f

Please sign in to comment.