enhance: Correct sampleFraction's type to float (#29810)

Signed-off-by: Yudong Cai <yudong.cai@zilliz.com>
This commit is contained in:
Cai Yudong 2024-01-10 13:18:50 +08:00 committed by GitHub
parent 600f6eff06
commit cb9d9ec0f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ namespace milvus::tracer {
struct TraceConfig {
std::string exporter;
int sampleFraction;
float sampleFraction;
std::string jaegerURL;
std::string otlpEndpoint;
bool oltpSecure;

View File

@ -92,7 +92,7 @@ typedef struct CStorageConfig {
typedef struct CTraceConfig {
const char* exporter;
int sampleFraction;
float sampleFraction;
const char* jaegerURL;
const char* otlpEndpoint;
bool oltpSecure;

View File

@ -47,7 +47,7 @@ func InitLocalChunkManager(path string) {
func InitTraceConfig(params *paramtable.ComponentParam) {
config := C.CTraceConfig{
exporter: C.CString(params.TraceCfg.Exporter.GetValue()),
sampleFraction: C.int(params.TraceCfg.SampleFraction.GetAsInt()),
sampleFraction: C.float(params.TraceCfg.SampleFraction.GetAsFloat()),
jaegerURL: C.CString(params.TraceCfg.JaegerURL.GetValue()),
otlpEndpoint: C.CString(params.TraceCfg.OtlpEndpoint.GetValue()),
nodeID: C.int(paramtable.GetNodeID()),