Skip to content

Commit

Permalink
dropping unused geronimo.opentracing.cdi.executorServices.wrappedNames
Browse files Browse the repository at this point in the history
  • Loading branch information
rmannibucau committed Oct 17, 2018
1 parent 3e0afcd commit 859bbc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 4 additions & 1 deletion README.adoc
Expand Up @@ -28,11 +28,14 @@ NOTE: if you are using Microprofile Config it is used, otherwise it uses system
|geronimo.opentracing.propagation.headers.spanId|Name of the header used to host the spanId value|`X-B3-SpanId`
|geronimo.opentracing.propagation.headers.traceId|Name of the header used to host the traceId value|`X-B3-TraceId`
|geronimo.opentracing.propagation.headers.baggagePrefix|Prefix of headers used to host the baggage values|`baggage-`
|geronimo.opentracing.cdi.executorServices.wrappedNames|Name (as CDI names of the beans) of executor services which will get an interceptor propagating the current scope (span)|-
|geronimo.opentracing.id.generator|`counter` (to generate longs), `uuid` (to generate random uuids) or `hex` (to use the hexa representation of the uuid generator). Specifies which kind of trace and span id are in use.|counter
|geronimo.opentracing.id.generator.hex.prefix|For hex generator, a prefix to prepend to all ids.|-
|geronimo.opentracing.span.converter.zipkin.active|Should spans converted to a zipkin representation. True until there is a standard opentracing format.|true
|geronimo.opentracing.span.converter.zipkin.serviceName|The local serviceName.|hostname-jvmid
|geronimo.opentracing.span.converter.zipkin.logger.active|Should a logger named `org.apache.geronimo.opentracing.zipkin` log each span as a Zipkin JSON. This allows to use a logger implementation to push the spans to any backend (like log4j2 kafka appender). It uses JUL as a facade.|true
|geronimo.opentracing.span.converter.zipkin.logger.wrapAsList|Should zipkin JSON be logged wrapped in a list.|true
|===

== ExecutorServices

To monitor a CDI executor service, you can decorate it with `@TracedExecutorService`.
Expand Up @@ -16,14 +16,9 @@
*/
package org.apache.geronimo.microprofile.opentracing.microprofile.cdi;

import static java.util.Optional.ofNullable;
import static java.util.stream.Collectors.toSet;

import java.lang.reflect.Type;
import java.util.Collection;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.stream.Stream;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
Expand All @@ -50,17 +45,13 @@ public class OpenTracingExtension implements Extension {

private GeronimoOpenTracingConfig config;

private Collection<String> instrumentedExecutorServices;

private boolean useZipkin;
private boolean useZipkinLogger;

void onStart(@Observes final BeforeBeanDiscovery beforeBeanDiscovery) {
config = GeronimoOpenTracingConfig.create();
useZipkin = Boolean.parseBoolean(config.read("span.converter.zipkin.active", "true"));
useZipkinLogger = useZipkin && Boolean.parseBoolean(config.read("span.converter.zipkin.logger.active", "true"));
instrumentedExecutorServices = ofNullable(config.read("cdi.executorServices.wrappedNames", null))
.map(s -> Stream.of(s.split(",")).map(String::trim).filter(it -> !it.isEmpty()).collect(toSet())).orElse(null);
}

void zipkinConverterToggle(@Observes final ProcessAnnotatedType<ZipkinConverter> onZipkinConverter) {
Expand Down

0 comments on commit 859bbc8

Please sign in to comment.