use of org.apache.synapse.aspects.flow.statistics.opentracing.management.JaegerTracingManager in project wso2-synapse by wso2.
the class OpenTracingManagerHolder method loadJaegerConfigurations.
/**
* Loads Jaeger configurations required for the OpenTracingManager.
*
* @param samplerManagerHostPort Jaeger sampler host and port.
* @param senderAgentHost Jaeger sender agent host.
* @param senderAgentPort Jaeger sender agent port.
* @param logSpans Log spans in Jaeger reporter or not.
* @param reporterMaxQueueSize Max queue size of the Jaeger reporter.
* @param reporterFlushInterval Flush interval of the Jaeger reporter.
*/
public static void loadJaegerConfigurations(String samplerManagerHostPort, String senderAgentHost, int senderAgentPort, boolean logSpans, int reporterMaxQueueSize, int reporterFlushInterval) {
Configuration.SamplerConfiguration sampler = new Configuration.SamplerConfiguration().withType(ConstSampler.TYPE).withParam(1).withManagerHostPort(samplerManagerHostPort);
Configuration.SenderConfiguration sender = new Configuration.SenderConfiguration().withAgentHost(senderAgentHost).withAgentPort(senderAgentPort);
Configuration.ReporterConfiguration reporter = new Configuration.ReporterConfiguration().withLogSpans(logSpans).withSender(sender).withMaxQueueSize(reporterMaxQueueSize).withFlushInterval(reporterFlushInterval);
openTracingManager = new JaegerTracingManager(sampler, reporter);
}
use of org.apache.synapse.aspects.flow.statistics.opentracing.management.JaegerTracingManager in project wso2-synapse by wso2.
the class OpenTracingManagerHolder method loadZipkinConfigurations.
/**
* Loads Zipkin configurations required for the OpenTracingManager.
*
* @param zipkinBackendURL
*/
public static void loadZipkinConfigurations(String zipkinBackendURL) {
ZipkinV2ReporterFactory factory = new ZipkinV2ReporterFactory(zipkinBackendURL);
ConstSampler sampler = new ConstSampler(true);
openTracingManager = new JaegerTracingManager(sampler, factory.getReporter());
}
Aggregations