Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Or it could be configured using JAXRSServerFactoryBean as well, for example:

Code Block
java
java
final Map<String, String> properties = new HashMap<String, String>();
properties.put("span.receiver", StandardOutSpanReceiver.class.getName());
properties.put("sampler", AlwaysSampler.class.getName());

final JAXRSServerFactoryBean factory = RuntimeDelegate.getInstance().createEndpoint(/* application instance */, JAXRSServerFactoryBean.class);
factory.setFeatures(Arrays.< Feature >asList(new HTraceFeature(HTraceConfiguration.fromMap(properties))));
...
return factory.create();

 Once the span receiver(s) and sampler are properly configured, all generated spans are going to be collected and available for analysis and/or visualization.