Skip to content

Commit

Permalink
Run format
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharycmontoya committed Jan 6, 2025
1 parent 977bc20 commit 07aa32b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/system-tests/request_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,21 @@ void RequestHandler::on_span_start(const httplib::Request& req,
success(span, res);
active_spans_.emplace(span.id(), std::move(span));
} else if (parent_header_it != http_headers_.cend()) {
auto span = tracer_.extract_span(utils::HeaderReader(parent_header_it->second), span_cfg);
auto span = tracer_.extract_span(
utils::HeaderReader(parent_header_it->second), span_cfg);
if (span) {
success(*span, res);
active_spans_.emplace(span->id(), std::move(*span));
} else {
const auto msg = "on_span_start: unable to create span from http_headers identified by parent_id " +
std::to_string(*parent_id);
const auto msg =
"on_span_start: unable to create span from http_headers identified "
"by parent_id " +
std::to_string(*parent_id);
VALIDATION_ERROR(res, msg);
}
} else {
const auto msg = "on_span_start: span or http_headers not found for id " +
std::to_string(*parent_id);
std::to_string(*parent_id);
VALIDATION_ERROR(res, msg);
}
} else {
Expand Down Expand Up @@ -246,11 +249,11 @@ void RequestHandler::on_extract_headers(const httplib::Request& req,
VALIDATION_ERROR(res, error->with_prefix("on_extract_headers: ").message);
}

// clang-format off
// clang-format off
const auto response_body = nlohmann::json{
{"span_id", span->parent_id().value() },
};
// clang-format on
// clang-format on

res.set_content(response_body.dump(), "application/json");
http_headers_.emplace(span->parent_id().value(), std::move(*http_headers));
Expand Down
1 change: 1 addition & 0 deletions test/system-tests/request_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <datadog/span_config.h>
#include <datadog/tracer.h>
#include <datadog/tracer_config.h>

#include <datadog/json.hpp>

#include "developer_noise.h"
Expand Down

0 comments on commit 07aa32b

Please sign in to comment.