Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions exporters/otlp/src/otlp_file_client.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

#include <nlohmann/json.hpp>

#include <limits.h>
#include <atomic>
#include <chrono>
Expand All @@ -12,7 +14,6 @@
#include <fstream>
#include <functional>
#include <mutex>
#include <nlohmann/json.hpp>
#include <ratio>
#include <string>
#include <thread>
Expand Down Expand Up @@ -1238,8 +1239,6 @@ class OPENTELEMETRY_LOCAL_SYMBOL OtlpFileSystemBackend : public OtlpFileAppender
}
file_path[file_path_size] = 0;

std::shared_ptr<FILE> of = std::make_shared<FILE>();

std::string directory_name = FileSystemUtil::DirName(file_path);
if (!directory_name.empty())
{
Expand Down Expand Up @@ -1294,7 +1293,7 @@ class OPENTELEMETRY_LOCAL_SYMBOL OtlpFileSystemBackend : public OtlpFileAppender
<< " failed with pattern: " << options_.file_pattern << hint);
return nullptr;
}
of = std::shared_ptr<std::FILE>(new_file, fclose);
std::shared_ptr<FILE> of = std::shared_ptr<std::FILE>(new_file, fclose);

fseek(of.get(), 0, SEEK_END);
file_->written_size = static_cast<size_t>(ftell(of.get()));
Expand Down
Loading