@@ -12,7 +12,7 @@ use crate::{
1212} ;
1313use ddcommon:: { hyper_migration, tag:: Tag , worker:: Worker } ;
1414
15- use std:: fmt:: Debug ;
15+ use std:: { collections :: HashSet , fmt:: Debug } ;
1616use std:: iter:: Sum ;
1717use std:: ops:: Add ;
1818use std:: {
@@ -120,7 +120,7 @@ struct TelemetryWorkerData {
120120 dependencies : store:: Store < Dependency > ,
121121 configurations : store:: Store < data:: Configuration > ,
122122 integrations : store:: Store < data:: Integration > ,
123- endpoints : Vec < data:: Endpoint > ,
123+ endpoints : HashSet < data:: Endpoint > ,
124124 logs : store:: QueueHashMap < LogIdentifier , Log > ,
125125 metric_contexts : MetricContexts ,
126126 metric_buckets : MetricBuckets ,
@@ -412,7 +412,7 @@ impl TelemetryWorker {
412412 AddDependency ( dep) => self . data . dependencies . insert ( dep) ,
413413 AddIntegration ( integration) => self . data . integrations . insert ( integration) ,
414414 AddConfig ( cfg) => self . data . configurations . insert ( cfg) ,
415- AddEndpoint ( endpoint) => self . data . endpoints . push ( endpoint) ,
415+ AddEndpoint ( endpoint) => { self . data . endpoints . insert ( endpoint) ; } ,
416416 AddLog ( ( identifier, log) ) => {
417417 let ( l, new) = self . data . logs . get_mut_or_insert ( identifier, log) ;
418418 if !new {
@@ -1036,7 +1036,7 @@ pub struct TelemetryWorkerBuilder {
10361036 pub dependencies : store:: Store < data:: Dependency > ,
10371037 pub integrations : store:: Store < data:: Integration > ,
10381038 pub configurations : store:: Store < data:: Configuration > ,
1039- pub endpoints : Vec < data:: Endpoint > ,
1039+ pub endpoints : HashSet < data:: Endpoint > ,
10401040 pub native_deps : bool ,
10411041 pub rust_shared_lib_deps : bool ,
10421042 pub config : Config ,
@@ -1087,7 +1087,7 @@ impl TelemetryWorkerBuilder {
10871087 dependencies : store:: Store :: new ( MAX_ITEMS ) ,
10881088 integrations : store:: Store :: new ( MAX_ITEMS ) ,
10891089 configurations : store:: Store :: new ( MAX_ITEMS ) ,
1090- endpoints : Vec :: new ( ) ,
1090+ endpoints : HashSet :: new ( ) ,
10911091 native_deps : true ,
10921092 rust_shared_lib_deps : false ,
10931093 config : Config :: default ( ) ,
0 commit comments