use of org.hypertrace.traceenricher.enrichment.enrichers.cache.EntityCache in project hypertrace-ingester by hypertrace.
the class BackendEntityEnricherTest method setup.
@BeforeEach
public void setup() {
enricher = new BackendEntityEnricher();
entityCache = new EntityCache(edsClient, Runnable::run);
when(clientRegistry.getEdsCacheClient()).thenReturn(edsClient);
when(clientRegistry.getEntityCache()).thenReturn(entityCache);
enricher.init(getEntityServiceConfig(), clientRegistry);
}
use of org.hypertrace.traceenricher.enrichment.enrichers.cache.EntityCache in project hypertrace-ingester by hypertrace.
the class DefaultServiceEntityEnricherTest method setup.
@BeforeEach
public void setup() {
enricher = new DefaultServiceEntityEnricher();
entityCache = new EntityCache(this.edsClient, Runnable::run);
when(clientRegistry.getEdsCacheClient()).thenReturn(edsClient);
when(clientRegistry.getEntityCache()).thenReturn(entityCache);
enricher.init(getEntityServiceConfig(), clientRegistry);
}
use of org.hypertrace.traceenricher.enrichment.enrichers.cache.EntityCache in project hypertrace-ingester by hypertrace.
the class StructuredTracesEnrichmentTest method setup.
@BeforeEach
public void setup() {
// Clear any stale entries in the entities cache.
String configFilePath = Thread.currentThread().getContextClassLoader().getResource(ENRICHER_CONFIG_FILE_NAME).getPath();
if (configFilePath == null) {
throw new RuntimeException("Cannot find enricher config file" + ENRICHER_CONFIG_FILE_NAME + "in the classpath");
}
Config fileConfig = ConfigFactory.parseFile(new File(configFilePath));
Config configs = ConfigFactory.load(fileConfig);
// Not passing the Entity Data Service configuration, unless the container id
// in the span data in inside EDS
when(clientRegistry.getEdsCacheClient()).thenReturn(edsClient);
entityCache = new EntityCache(edsClient, Runnable::run);
when(clientRegistry.getEntityCache()).thenReturn(entityCache);
enrichmentProcessor = createEnricherProcessor(configs);
mockGetServiceEntityMethod();
}
Aggregations