mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 04:52:10 +00:00
Add attributes
This commit is contained in:
parent
7dda18c209
commit
0a42dbafe8
@ -179,6 +179,9 @@ void WriteBufferFromS3::preFinalize()
|
||||
void WriteBufferFromS3::finalizeImpl()
|
||||
{
|
||||
OpenTelemetry::SpanHolder span("WriteBufferFromS3::finalizeImpl");
|
||||
span.addAttribute("clickhouse.s3_bucket", bucket);
|
||||
span.addAttribute("clickhouse.s3_key", key);
|
||||
span.addAttribute("clickhouse.total_size", total_size);
|
||||
|
||||
LOG_TRACE(limitedLog, "finalizeImpl WriteBufferFromS3. {}.", getShortLogDetails());
|
||||
|
||||
@ -190,6 +193,8 @@ void WriteBufferFromS3::finalizeImpl()
|
||||
|
||||
task_tracker->waitAll();
|
||||
|
||||
span.addAttributeIfNotZero("clickhouse.multipart_upload_parts", multipart_tags.size());
|
||||
|
||||
if (!multipart_upload_id.empty())
|
||||
{
|
||||
completeMultipartUpload();
|
||||
|
@ -319,6 +319,9 @@ Block MergeTreeDataWriter::mergeBlock(
|
||||
|
||||
size_t block_size = block.rows();
|
||||
|
||||
span.addAttribute("clickhouse.rows", block_size);
|
||||
span.addAttribute("clickhouse.columns", block.columns());
|
||||
|
||||
auto get_merging_algorithm = [&]() -> std::shared_ptr<IMergingAlgorithm>
|
||||
{
|
||||
switch (merging_params.mode)
|
||||
@ -354,6 +357,8 @@ Block MergeTreeDataWriter::mergeBlock(
|
||||
if (!merging_algorithm)
|
||||
return block;
|
||||
|
||||
span.addAttribute("clickhouse.merging_algorithm", merging_algorithm->getName());
|
||||
|
||||
Chunk chunk(block.getColumns(), block_size);
|
||||
|
||||
IMergingAlgorithm::Input input;
|
||||
|
Loading…
Reference in New Issue
Block a user