Skip to content

Commit 92456d6

Browse files
committed
merged from upstream
1 parent ba08365 commit 92456d6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

resource_detectors/include/opentelemetry/resource_detectors/detail/process_detector_utils.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace detail
1818
* Forms a file path for a process type based on the given PID.
1919
* for example - /proc/<pid>/cmdline, /proc/<pid>/exe
2020
*/
21-
std::string FormFilePath(const int32_t &pid, const char *process_type);
21+
std::string OPENTELEMETRY_EXPORT FormFilePath(const int32_t &pid, const char *process_type);
2222

2323
/**
2424
* Retrieves the absolute file system path to the executable for a given PID.
@@ -29,7 +29,7 @@ std::string FormFilePath(const int32_t &pid, const char *process_type);
2929
*
3030
* @param pid Process ID.
3131
*/
32-
std::string GetExecutablePath(const int32_t &pid);
32+
std::string OPENTELEMETRY_EXPORT GetExecutablePath(const int32_t &pid);
3333

3434
/**
3535
* Retrieves the command used to launch the process for a given PID.
@@ -38,14 +38,14 @@ std::string GetExecutablePath(const int32_t &pid);
3838
* - Linux/Unix: Reads the zeroth string of /proc/<pid>/cmdline file.
3939
* - TODO: Need to implement for Darwin
4040
*/
41-
std::string ExtractCommand(const std::string &command_line_path);
41+
std::string OPENTELEMETRY_EXPORT ExtractCommand(const std::string &command_line_path);
4242

4343
/**
4444
* Retrieves the command used to launch the process for a given PID.
4545
* This function is a wrapper around ExtractCommand() and is provided for convenience and
4646
* testability of ExtractCommand().
4747
*/
48-
std::string GetCommand(const int32_t &pid);
48+
std::string OPENTELEMETRY_EXPORT GetCommand(const int32_t &pid);
4949

5050
} // namespace detail
5151
} // namespace resource_detector

resource_detectors/include/opentelemetry/resource_detectors/process_detector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace resource_detector
1717
* and sets attributes like process.pid, process.executable.path, and process.command following
1818
* the OpenTelemetry semantic conventions.
1919
*/
20-
class ProcessResourceDetector : public opentelemetry::sdk::resource::ResourceDetector
20+
class OPENTELEMETRY_EXPORT_TYPE ProcessResourceDetector : public opentelemetry::sdk::resource::ResourceDetector
2121
{
2222
public:
2323
/**

0 commit comments

Comments
 (0)