Bug Description
When enabling both Geneva logging and metrics exporters in the same binary on Linux, compilation fails due to a type redefinition.
Including both:
#include "opentelemetry/exporters/geneva/geneva_logger_exporter.h"
#include "opentelemetry/exporters/geneva/metrics/exporter.h"
causes a conflict between two internal headers that define the same type:
namespace net {
struct Thread { ... };
}
💥 Build Error
error: redefinition of ‘struct net::Thread’
Include chain (simplified)
Metrics exporter:
geneva/metrics/exporter.h
-> geneva/metrics/socket_tools.h
-> defines net::Thread
Logger exporter:
geneva/geneva_logger_exporter.h
-> fluentd/common/socket_tools.h
-> defines net::Thread
Compiler output:
.../geneva/metrics/socket_tools.h:119:8:
error: redefinition of ‘struct net::Thread’
.../fluentd/common/socket_tools.h:116:8:
note: previous definition of ‘struct net::Thread’
🧩 Environment
OS: Linux (ARM64)
Toolchain: GCC (CI build)
Installation: vcpkg
OpenTelemetry C++
Geneva exporters enabled for both logs and metrics
🧠 Observations
This appears to be an ODR violation caused by two different internal headers defining the same type in the same namespace.
The issue occurs even with different include orders.
Header include guards do not prevent the conflict because the files are different.
The problem reproduces consistently on Linux.
Bug Description
When enabling both Geneva logging and metrics exporters in the same binary on Linux, compilation fails due to a type redefinition.
Including both:
#include "opentelemetry/exporters/geneva/geneva_logger_exporter.h"
#include "opentelemetry/exporters/geneva/metrics/exporter.h"
causes a conflict between two internal headers that define the same type:
namespace net {
struct Thread { ... };
}
💥 Build Error
error: redefinition of ‘struct net::Thread’
Include chain (simplified)
Metrics exporter:
geneva/metrics/exporter.h
-> geneva/metrics/socket_tools.h
-> defines net::Thread
Logger exporter:
geneva/geneva_logger_exporter.h
-> fluentd/common/socket_tools.h
-> defines net::Thread
Compiler output:
.../geneva/metrics/socket_tools.h:119:8:
error: redefinition of ‘struct net::Thread’
.../fluentd/common/socket_tools.h:116:8:
note: previous definition of ‘struct net::Thread’
🧩 Environment
OS: Linux (ARM64)
Toolchain: GCC (CI build)
Installation: vcpkg
OpenTelemetry C++
Geneva exporters enabled for both logs and metrics
🧠 Observations
This appears to be an ODR violation caused by two different internal headers defining the same type in the same namespace.
The issue occurs even with different include orders.
Header include guards do not prevent the conflict because the files are different.
The problem reproduces consistently on Linux.