Monat: Mai 2020

Second Step – JEE Microservices with MicroProfile-Opentracing

Blog

Second Step - JEE Microservices with MicroProfile-Opentracing

...rest clients --> ...
...clients --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
...<groupId>org.eclipse.microprofile.config</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
... <artifactId>microprofile-rest-client-api</artifactId> ...
...<artifactId>microprofile-rest-client-api</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
... <version>${version.microprofile.rest.client}</version> ...
...<version>${version.microprofile.rest.client}</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... <!-- ...
... <!-- Because ...
... <!-- Because MicroProfile-Rest-Client ...
...MicroProfile-Rest-Client is ...
...is ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... configured ...
... configured via ...
... configured via MicroProfile-Config ...
...via MicroProfile-Config --> ...
...MicroProfile-Config --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
...<groupId>org.eclipse.microprofile.config</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
... <artifactId>microprofile-config-api</artifactId> ...
...<artifactId>microprofile-config-api</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
... <version>${version.microprofile.config}</version> ...
...<version>${version.microprofile.config}</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... <!-- ...
... <!-- Provides ...
... <!-- Provides an ...
...custom server ...
...server ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... and ...
... and client ...
... and client side ...
...side tracing (SpanDecorators). ...
...tracing (SpanDecorators). ...
...(SpanDecorators). ...
... ...
... ...
... ...
... ...
... ...
... ...
... WIldfly ...
... WIldfly Module ...
... WIldfly Module will ...
...during runtime --> ...
...runtime --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
...<groupId>io.opentracing.contrib</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
...<artifactId>opentracing-jaxrs2</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>0.4.1</version> ...
... <version>0.4.1</version> ...
... <version>0.4.1</version> ...
... <version>0.4.1</version> ...
... <version>0.4.1</version> ...
...<version>0.4.1</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... <!-- ...
... <!-- Provides ...
... <!-- Provides an ...
...provides our ...
...our ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... Tracer ...
... Tracer to ...
... Tracer to the ...
...application and subsystem. ...
...and subsystem. ...
...subsystem. ...
... ...
... ...
... ...
... ...
... ...
... ...
... WIldfly ...
... WIldfly Module ...
... WIldfly Module will ...
...during runtime --> ...
...runtime --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
...<groupId>io.opentracing.contrib</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
...<artifactId>opentracing-tracerresolver</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>0.1.8</version> ...
... <version>0.1.8</version> ...
... <version>0.1.8</version> ...
... <version>0.1.8</version> ...
... <version>0.1.8</version> ...
...<version>0.1.8</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> ...
... ...
... <!-- ...
... <!-- The ...
... <!-- The opentracing ...
...opentracing api --> ...
...api --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
... <groupId>org.eclipse.microprofile.config</groupId> ...
...<groupId>org.eclipse.microprofile.config</groupId> ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>microprofile-opentracing-api</artifactId> ...
... <artifactId>microprofile-opentracing-api</artifactId> ...
... <artifactId>microprofile-opentracing-api</artifactId> ...
... <artifactId>microprofile-opentracing-api</artifactId> ...
... <artifactId>microprofile-opentracing-api</artifactId> ...
...<artifactId>microprofile-opentracing-api</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.microprofile.opentracing}</version> ...
... <version>${version.microprofile.opentracing}</version> ...
... <version>${version.microprofile.opentracing}</version> ...
... <version>${version.microprofile.opentracing}</version> ...
... <version>${version.microprofile.opentracing}</version> ...
...<version>${version.microprofile.opentracing}</version> ...
... ...
... ...
... ...
... ...
... ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
... <scope>provided</scope> ...
...<scope>provided</scope> ...
... ...
... </dependency> Integration ...
... </dependency> Integration with ...
... </dependency> Integration with Thorntail Thorntail ...
...fraction for MicroProfile-Config. <dependencyManagement> ...
...for MicroProfile-Config. <dependencyManagement> ...
...MicroProfile-Config. <dependencyManagement> <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
...<artifactId>bom</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
...<version>${version.thorntail}</version> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... ...
... ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
...</dependency> </dependencies> ...
... </dependencies> ...
... </dependencies> </dependencyManagement> ...
... </dependencies> </dependencyManagement> <dependencies> ...
...</dependencies> </dependencyManagement> <dependencies> ...
...</dependencyManagement> <dependencies> ...
... <dependencies> ...
...<dependencies> <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
...<artifactId>microprofile-config</artifactId> </dependency> ...
... </dependency> ...
... </dependency> </dependencies> Configuration Getting ...
... </dependency> </dependencies> Configuration Getting Opentracing to ...
...api. jboss-deployment-structure.xml <?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure> <deployment> ...
...version="1.0" encoding="UTF-8"?> <jboss-deployment-structure> <deployment> ...
...encoding="UTF-8"?> <jboss-deployment-structure> <deployment> ...
... <deployment> ...
... <deployment> ...
...<deployment> ...
... ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
... <dependencies> ...
...<dependencies> ...
... ...
... ...
... ...
... ...
... ...
... <!-- ...
... <!-- Because ...
... <!-- Because we ...
...the Tracer --> ...
...Tracer --> ...
...--> ...
... ...
... ...
... ...
... ...
... ...
... <module ...
... <module name="io.jaegertracing.jaeger" ...
... <module name="io.jaegertracing.jaeger" /> ...
...<module name="io.jaegertracing.jaeger" /> ...
...name="io.jaegertracing.jaeger" /> ...
.../> ...
... ...
... ...
... ...
... ...
... ...
... <!-- ...
... <!-- Contains ...
... <!-- Contains api ...
...for SpanDecorators --> ...
...SpanDecorators --> ...
...--> ...
... ...
... ...
... ...
... ...
... ...
... <module ...
... <module name="io.opentracing.contrib.opentracing-jaxrs2"/> ...
... <module name="io.opentracing.contrib.opentracing-jaxrs2"/> ...
... <module name="io.opentracing.contrib.opentracing-jaxrs2"/> ...
...<module name="io.opentracing.contrib.opentracing-jaxrs2"/> ...
...name="io.opentracing.contrib.opentracing-jaxrs2"/> ...
... ...
... </dependencies> ...
... </dependencies> ...
... </dependencies> ...
... </dependencies> </deployment> </jboss-deployment-structure> ...
... </dependencies> </deployment> </jboss-deployment-structure> TracerFactory ...
...</dependencies> </deployment> </jboss-deployment-structure> TracerFactory discovered ...
...and registered in ...
...registered in ...
...in ...
... ...
... ...
... ...
... ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory at.ihet.samples.microprofile.opentracing.TracerFactory Create ...
... META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory at.ihet.samples.microprofile.opentracing.TracerFactory Create Tracer ...
... at.ihet.samples.microprofile.opentracing.TracerFactory Create Tracer from ...
... io.opentracing.contrib.tracerresolver.TracerFactory { @Override ...
...io.opentracing.contrib.tracerresolver.TracerFactory { @Override ...
...{ @Override ...
... @Override public ...
... @Override public Tracer ...
...@Override public Tracer getTracer() ...
...Tracer getTracer() { ...
...getTracer() { ...
...{ ...
... ...
... Configuration ...
... Configuration configuration ...
... Configuration configuration = ...
...configuration = Configuration.fromEnv(); ...
...= Configuration.fromEnv(); ...
...Configuration.fromEnv(); ...
... ...
... Tracer ...
... Tracer tracer ...
... Tracer tracer = ...
...tracer = configuration.getTracer(); ...
...= configuration.getTracer(); ...
...configuration.getTracer(); ...
... ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
...GlobalTracer.register(tracer); ...
... ...
... return ...
... return tracer; ...
... return tracer; ...
... return tracer; } } Jaeger ...
...return tracer; } } Jaeger configuration ...
...tracer; } } Jaeger configuration either ...
...fraction for MicroProfile-Rest-Client. <dependencyManagement> <dependencies> ...
...for MicroProfile-Rest-Client. <dependencyManagement> <dependencies> ...
... <dependencies> ...
... <dependencies> ...
...<dependencies> <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
... <artifactId>bom</artifactId> ...
...<artifactId>bom</artifactId> ...
... ...
... ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
... <version>${version.thorntail}</version> ...
...<version>${version.thorntail}</version> ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> </dependencies> </dependencyManagement> ...
... </dependency> </dependencies> </dependencyManagement> <dependencies> ...
...</dependency> </dependencies> </dependencyManagement> <dependencies> ...
... </dependencies> </dependencyManagement> <dependencies> <dependency> ...
...</dependencies> </dependencyManagement> <dependencies> <dependency> ...
...<dependencies> <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> ...
... <artifactId>microprofile-config</artifactId> </dependency> ...
... <artifactId>microprofile-config</artifactId> </dependency> ...
...<artifactId>microprofile-config</artifactId> </dependency> ...
... </dependency> <dependency> ...
... </dependency> <dependency> ...
...</dependency> <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... <artifactId>microprofile-restclient</artifactId> ...
... <artifactId>microprofile-restclient</artifactId> ...
... <artifactId>microprofile-restclient</artifactId> ...
... <artifactId>microprofile-restclient</artifactId> </dependency> ...
... <artifactId>microprofile-restclient</artifactId> </dependency> ...
...<artifactId>microprofile-restclient</artifactId> </dependency> ...
... </dependency> <dependency> ...
... </dependency> <dependency> ...
...</dependency> <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
... <groupId>io.thorntail</groupId> ...
...<groupId>io.thorntail</groupId> ...
... ...
... <artifactId>microprofile-opentracing</artifactId> ...
... <artifactId>microprofile-opentracing</artifactId> ...
... <artifactId>microprofile-opentracing</artifactId> ...
... <artifactId>microprofile-opentracing</artifactId> ...
... <artifactId>microprofile-opentracing</artifactId> </dependency> </dependencies>   Additionally ...
...<artifactId>microprofile-opentracing</artifactId> </dependency> </dependencies>   Additionally to ...
... </dependency> </dependencies>   Additionally to the ...
...traces. Throntail YAML configuration: thorntail: jaeger: ...
...configuration: thorntail: jaeger: service-name: ...
... jaeger: service-name: microprofile-opentracing-thorntail ...
...jaeger: service-name: microprofile-opentracing-thorntail ...
... service-name: microprofile-opentracing-thorntail agent-host: ...
...service-name: microprofile-opentracing-thorntail agent-host: localhost ...
...microprofile-opentracing-thorntail agent-host: localhost ...
... agent-host: localhost agent-port: ...
...agent-host: localhost agent-port: 6831 ...
...localhost agent-port: 6831 ...
... agent-port: 6831 reporter-log-spans: ...
...agent-port: 6831 reporter-log-spans: true ...
...6831 reporter-log-spans: true ...
... reporter-log-spans: true reporter-flush-interval: ...
...reporter-log-spans: true reporter-flush-interval: 2000 ...
...true reporter-flush-interval: 2000 ...
... reporter-flush-interval: 2000 sampler-type: ...
...reporter-flush-interval: 2000 sampler-type: const ...
...2000 sampler-type: const ...
... sampler-type: const sampler-parameter: ...
...sampler-type: const sampler-parameter: 1 Integration ...
...const sampler-parameter: 1 Integration with ...
...specific Quarkus version. <dependencyManagement> <dependencies> ...
...version. <dependencyManagement> <dependencies> ...
... <dependencies> <dependency> ...
...<dependencies> <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
... <artifactId>quarkus-bom</artifactId> ...
...<artifactId>quarkus-bom</artifactId> ...
... ...
... ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
... <version>${quarkus.version}</version> ...
...<version>${quarkus.version}</version> ...
... ...
... ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
... <type>pom</type> ...
...<type>pom</type> ...
... ...
... ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
... <scope>import</scope> ...
...<scope>import</scope> </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> </dependencies> ...
... </dependency> </dependencies> </dependencyManagement> ...
...</dependency> </dependencies> </dependencyManagement> <dependencies> ...
...</dependencies> </dependencyManagement> <dependencies> ...
...</dependencyManagement> <dependencies> <!-- ...
...<dependencies> <!-- MicroProfile-Config ...
... <!-- MicroProfile-Config is ...
...of configuring ...
...configuring ...
... ...
... Quarkus, ...
... Quarkus, so ...
... Quarkus, so there ...
...a dependency --> ...
...dependency --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
... <artifactId>quarkus-rest-client</artifactId> ...
...<artifactId>quarkus-rest-client</artifactId> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> <!-- ...
...</dependency> <!-- Quarkus ...
... <!-- Quarkus uses ...
...smallrye implementation --> ...
...implementation --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>quarkus-smallrye-opentracing</artifactId> ...
... <artifactId>quarkus-smallrye-opentracing</artifactId> ...
... <artifactId>quarkus-smallrye-opentracing</artifactId> ...
... <artifactId>quarkus-smallrye-opentracing</artifactId> ...
... <artifactId>quarkus-smallrye-opentracing</artifactId> ...
...<artifactId>quarkus-smallrye-opentracing</artifactId> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> <!-- ...
...</dependency> <!-- Because ...
... <!-- Because we ...
...Tracer --> ...
...--> ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
... <groupId>io.quarkus</groupId> ...
...<groupId>io.quarkus</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>quarkus-jaeger</artifactId> ...
... <artifactId>quarkus-jaeger</artifactId> ...
... <artifactId>quarkus-jaeger</artifactId> ...
... <artifactId>quarkus-jaeger</artifactId> ...
... <artifactId>quarkus-jaeger</artifactId> ...
...<artifactId>quarkus-jaeger</artifactId> ...
... ...
... ...
... ...
... ...
... ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> <!-- ...
...</dependency> <!-- Because ...
... <!-- Because we ...
...server and ...
...and ...
... ...
... ...
... ...
... ...
... ...
... client ...
... client side ...
... client side tracing ...
...side tracing --> ...
...tracing --> ...
...--> ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
...<groupId>io.opentracing.contrib</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
... <artifactId>opentracing-jaxrs2</artifactId> ...
...<artifactId>opentracing-jaxrs2</artifactId> ...
... ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> ...
... </dependency> <!-- ...
...</dependency> <!-- Because ...
... <!-- Because we ...
...Tracer --> ...
...--> ...
... ...
... ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
... <dependency> ...
...<dependency> ...
... ...
... ...
... ...
... ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
... <groupId>io.opentracing.contrib</groupId> ...
...<groupId>io.opentracing.contrib</groupId> ...
... ...
... ...
... ...
... ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
... <artifactId>opentracing-tracerresolver</artifactId> ...
...<artifactId>opentracing-tracerresolver</artifactId> ...
... ...
... </dependency> </dependencies> Additionally ...
... </dependency> </dependencies> Additionally to ...
... </dependency> </dependencies> Additionally to the ...
...TracerFactory implements ...
...implements io.opentracing.contrib.tracerresolver.TracerFactory ...
... io.opentracing.contrib.tracerresolver.TracerFactory { ...
... io.opentracing.contrib.tracerresolver.TracerFactory { ...
... io.opentracing.contrib.tracerresolver.TracerFactory { @Override ...
...io.opentracing.contrib.tracerresolver.TracerFactory { @Override ...
...{ @Override ...
... @Override public ...
... @Override public Tracer ...
...@Override public Tracer getTracer() ...
...Tracer getTracer() { ...
...getTracer() { ...
...{ ...
... ...
... Configuration ...
... Configuration configuration ...
... Configuration configuration = ...
...configuration = Configuration.fromEnv(); ...
...= Configuration.fromEnv(); ...
...Configuration.fromEnv(); ...
... ...
... Tracer ...
... Tracer tracer ...
... Tracer tracer = ...
...tracer = configuration.getTracer(); ...
...= configuration.getTracer(); ...
...configuration.getTracer(); ...
... ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
... GlobalTracer.register(tracer); ...
...GlobalTracer.register(tracer); ...
... ...
... return ...
... return tracer; ...
... return tracer; ...
... return tracer; } } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
...return tracer; } } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
...tracer; } } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... } } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory ...
... } } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory at.ihet.samples.microprofile.opentracing.TracerFactory The ...
...} } META-INF/services/io.opentracing.contrib.tracerresolver.TracerFactory at.ihet.samples.microprofile.opentracing.TracerFactory The TracerFactory ...
... at.ihet.samples.microprofile.opentracing.TracerFactory The TracerFactory is ...
...implements ServerSpanDecorator { @Override ...
...ServerSpanDecorator { @Override ...
...{ @Override ...
... @Override public ...
... @Override public void ...
...@Override public void decorateRequest(ContainerRequestContext ...
...void decorateRequest(ContainerRequestContext ...
...decorateRequest(ContainerRequestContext ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... requestContext, ...
... requestContext, Span ...
... requestContext, Span span) ...
...Span span) { ...
...span) { ...
...{ span.setOperationName(requestContext.getUriInfo().getPath()); ...
... span.setOperationName(requestContext.getUriInfo().getPath()); ...
... span.setOperationName(requestContext.getUriInfo().getPath()); ...
... span.setOperationName(requestContext.getUriInfo().getPath()); } ...
... span.setOperationName(requestContext.getUriInfo().getPath()); } ...
...span.setOperationName(requestContext.getUriInfo().getPath()); } ...
... } @Override ...
... } @Override ...
...} @Override ...
... @Override public ...
... @Override public void ...
...@Override public void decorateResponse(ContainerResponseContext ...
...void decorateResponse(ContainerResponseContext ...
...decorateResponse(ContainerResponseContext ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... responseContext, ...
... responseContext, Span ...
... responseContext, Span span) ...
...Span span) { ...
...span) { ...
...{ ...
... ...
... span.setBaggageItem("response.body", ...
... span.setBaggageItem("response.body", ...
... span.setBaggageItem("response.body", ...
... span.setBaggageItem("response.body", ...
... span.setBaggageItem("response.body", ...
...span.setBaggageItem("response.body", ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); } } // ...
... JsonbBuilder.create().toJson(response.getEntity())); } } // Register ...
...JsonbBuilder.create().toJson(response.getEntity())); } } // Register server ...
...implements DynamicFeature { private ...
...DynamicFeature { private static ...
...{ private static DynamicFeature ...
...tracingFeature = new ...
...= new ...
... ...
... ...
... ...
... ...
... ...
... ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
... ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
... ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
... ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
... ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
...ServerTracingDynamicFeature.Builder(GlobalTracer.get()) ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Here ...
... // Here we ...
...register our decorator ...
...our decorator ...
...decorator ...
... ...
... ...
... ...
... ...
... ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
....withDecorators(Collections.singletonList( ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... new ...
... new ServerTracingDecorator())) ...
... new ServerTracingDecorator())) ...
... new ServerTracingDecorator())) ...
...new ServerTracingDecorator())) ...
...ServerTracingDecorator())) ...
... ...
... ...
... ...
... ...
... ...
... .withSerializationDecorators(Collections.emptyList()) ...
... .withSerializationDecorators(Collections.emptyList()) ...
... .withSerializationDecorators(Collections.emptyList()) ...
... .withSerializationDecorators(Collections.emptyList()) ...
... .withSerializationDecorators(Collections.emptyList()) ...
....withSerializationDecorators(Collections.emptyList()) ...
... ...
... ...
... ...
... ...
... ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
....withTraceSerialization(false) ...
... ...
... ...
... ...
... ...
... ...
... .withJoinExistingActiveSpan(false) ...
... .withJoinExistingActiveSpan(false) ...
... .withJoinExistingActiveSpan(false) ...
... .withJoinExistingActiveSpan(false) ...
... .withJoinExistingActiveSpan(false) ...
....withJoinExistingActiveSpan(false) ...
... ...
... ...
... ...
... ...
... ...
... .build(); ...
... .build(); ...
... .build(); ...
... .build(); @Override ...
... .build(); @Override ...
....build(); @Override ...
... @Override public ...
... @Override public void ...
...@Override public void configure(ResourceInfo ...
...configure(ResourceInfo resourceInfo, ...
...resourceInfo, ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... FeatureContext ...
... FeatureContext context) ...
... FeatureContext context) { ...
...FeatureContext context) { ...
...context) { ...
...{ ...
... ...
... // ...
... // Here ...
... // Here we ...
...custom built feature ...
...built feature ...
...feature ...
... ...
... tracingFeature.configure(resourceInfo, ...
... tracingFeature.configure(resourceInfo, context); ...
... tracingFeature.configure(resourceInfo, context); ...
... tracingFeature.configure(resourceInfo, context); } } // ...
...tracingFeature.configure(resourceInfo, context); } } // Client ...
...context); } } // Client side ...
...implements ClientSpanDecorator { @Override ...
...ClientSpanDecorator { @Override ...
...{ @Override ...
... @Override public ...
... @Override public void ...
...@Override public void decorateRequest(ClientRequestContext ...
...decorateRequest(ClientRequestContext requestContext, ...
...requestContext, ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... Span ...
... Span span) ...
... Span span) { ...
...Span span) { ...
...span) { ...
...{ ...
... ...
... span.setBaggageItem("request.body", ...
... span.setBaggageItem("request.body", ...
... span.setBaggageItem("request.body", ...
... span.setBaggageItem("request.body", ...
... span.setBaggageItem("request.body", ...
...span.setBaggageItem("request.body", ...
... ...
... ...
... ...
... ...
... ...
... ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
... JsonbBuilder.create().toJson(response.getEntity())); ...
...JsonbBuilder.create().toJson(response.getEntity())); ...
... ...
... span.setOperationName(String.format(" ...
... span.setOperationName(String.format(" %s", ...
... span.setOperationName(String.format(" %s", ...
... span.setOperationName(String.format(" %s", ...
...span.setOperationName(String.format(" %s", ...
...%s", ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... requestContext.getUri().getHost(), ...
... requestContext.getUri().getHost(), ...
... requestContext.getUri().getHost(), ...
... requestContext.getUri().getHost(), ...
... requestContext.getUri().getHost(), ...
...requestContext.getUri().getHost(), ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... requestContext.getUri().getPath())); ...
... requestContext.getUri().getPath())); ...
... requestContext.getUri().getPath())); ...
... requestContext.getUri().getPath())); } ...
... requestContext.getUri().getPath())); } ...
...requestContext.getUri().getPath())); } ...
... } @Override ...
... } @Override ...
...} @Override ...
... @Override public void ...
... @Override public void decorateResponse(ClientResponseContext ...
...decorateResponse(ClientResponseContext responseContext, ...
...responseContext, ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... Span ...
... Span span) ...
... Span span) { ...
...Span span) { ...
...span) { ...
...{ String ...
... String body ...
... String body = ...
...body = ""; ...
...= ""; ...
...""; if ...
... if (responseContext.hasEntity()) ...
... if (responseContext.hasEntity()) { ...
...if (responseContext.hasEntity()) { ...
...(responseContext.hasEntity()) { ...
...{ ...
... body ...
... body = ...
... body = readEntityFromInputStream( ...
...body = readEntityFromInputStream( ...
...= readEntityFromInputStream( ...
...readEntityFromInputStream( ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... responseContext.getEntityStream()); ...
... responseContext.getEntityStream()); ...
... responseContext.getEntityStream()); ...
... responseContext.getEntityStream()); ...
... responseContext.getEntityStream()); ...
...responseContext.getEntityStream()); ...
... responseContext.setEntityStream(new ...
... responseContext.setEntityStream(new ...
... responseContext.setEntityStream(new ...
... responseContext.setEntityStream(new ...
...responseContext.setEntityStream(new ...
... ...
... ...
... ...
... ...
... BufferedInputStream( ...
... BufferedInputStream( ...
... BufferedInputStream( ...
... BufferedInputStream( ...
...BufferedInputStream( ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... new ...
... new ByteArrayInputStream( ...
... new ByteArrayInputStream( ...
... new ByteArrayInputStream( ...
...new ByteArrayInputStream( ...
...ByteArrayInputStream( ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... body.getBytes(StandardCharsets.UTF_8)))); ...
... body.getBytes(StandardCharsets.UTF_8)))); ...
... body.getBytes(StandardCharsets.UTF_8)))); ...
... body.getBytes(StandardCharsets.UTF_8)))); ...
... body.getBytes(StandardCharsets.UTF_8)))); ...
...body.getBytes(StandardCharsets.UTF_8)))); ...
... } ...
... } ...
... } ...
... } ...
... } ...
...} ...
... ...
... span.setBaggageItem("response.body", ...
... span.setBaggageItem("response.body", body); ...
... span.setBaggageItem("response.body", body); ...
... span.setBaggageItem("response.body", body); } ...
...span.setBaggageItem("response.body", body); } ...
...body); } ...
... } private ...
... } private String ...
...} private String readEntityFromInputStream(final ...
...InputStream is) { ...
...is) { ...
...{ try ...
... try { ...
... try { ...
... try { ...
...try { ...
...{ ...
... ...
... ...
... ...
... ByteArrayOutputStream ...
... ByteArrayOutputStream bos ...
... ByteArrayOutputStream bos = ...
...= new ByteArrayOutputStream(1024); ...
...new ByteArrayOutputStream(1024); ...
...ByteArrayOutputStream(1024); ...
... ...
... ...
... ...
... IOUtils.copy(is, ...
... IOUtils.copy(is, bos); ...
... IOUtils.copy(is, bos); ...
... IOUtils.copy(is, bos); ...
...IOUtils.copy(is, bos); ...
...bos); ...
... ...
... ...
... ...
... return ...
... return new ...
... return new String(bos.toByteArray(),StandardCharsets.UTF_8); ...
...return new String(bos.toByteArray(),StandardCharsets.UTF_8); ...
...new String(bos.toByteArray(),StandardCharsets.UTF_8); ...
...String(bos.toByteArray(),StandardCharsets.UTF_8); ...
... ...
... } ...
... } catch ...
... } catch (Throwable ...
...(Throwable e) { ...
...e) { ...
...{ ...
... ...
... ...
... ...
... ...
... ...
... return ...
... return "not_readable: ...
... return "not_readable: " ...
..." + e.getMessage(); ...
...+ e.getMessage(); ...
...e.getMessage(); ...
... ...
... } ...
... } ...
... } ...
... } } } The ...
... } } } The client ...
...} } } The client side ...
...ExternalRestResource createRestClient() { try { ...
...createRestClient() { try { ...
... try { final ...
...try { final ClientTracingFeature ...
...{ final ClientTracingFeature feature ...
...feature = createClientTracingFeature(); return ...
...= createClientTracingFeature(); return RestClientBuilder.newBuilder() ...
...createClientTracingFeature(); return RestClientBuilder.newBuilder() ...
... return RestClientBuilder.newBuilder() ...
...return RestClientBuilder.newBuilder() ...
...RestClientBuilder.newBuilder() ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .baseUrl(new ...
... .baseUrl(new URL("http://httpbin.org")) ...
... .baseUrl(new URL("http://httpbin.org")) ...
... .baseUrl(new URL("http://httpbin.org")) ...
....baseUrl(new URL("http://httpbin.org")) ...
...URL("http://httpbin.org")) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .readTimeout(2000, ...
... .readTimeout(2000, TimeUnit.SECONDS) ...
... .readTimeout(2000, TimeUnit.SECONDS) ...
... .readTimeout(2000, TimeUnit.SECONDS) ...
....readTimeout(2000, TimeUnit.SECONDS) ...
...TimeUnit.SECONDS) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .connectTimeout(2000, ...
... .connectTimeout(2000, TimeUnit.SECONDS) ...
... .connectTimeout(2000, TimeUnit.SECONDS) ...
... .connectTimeout(2000, TimeUnit.SECONDS) ...
....connectTimeout(2000, TimeUnit.SECONDS) ...
...TimeUnit.SECONDS) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Here ...
... // Here we ...
...custom built feature ...
...built feature ...
...feature ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .register(feature) ...
... .register(feature) ...
... .register(feature) ...
... .register(feature) ...
... .register(feature) ...
....register(feature) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .build(ExternalRestResource.class); ...
... .build(ExternalRestResource.class); ...
... .build(ExternalRestResource.class); ...
... .build(ExternalRestResource.class); } catch ...
... .build(ExternalRestResource.class); } catch (MalformedURLException ...
...(MalformedURLException e) { throw ...
...e) { throw new ...
...{ throw new RuntimeException("URI ...
...is not valid"); } } private ClientTracingFeature ...
...not valid"); } } private ClientTracingFeature createClientTracingFeature() ...
...ClientTracingFeature createClientTracingFeature() { return new ClientTracingFeature.Builder(GlobalTracer.get()) ...
...return new ClientTracingFeature.Builder(GlobalTracer.get()) ...
...new ClientTracingFeature.Builder(GlobalTracer.get()) ...
...ClientTracingFeature.Builder(GlobalTracer.get()) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
... .withTraceSerialization(false) ...
....withTraceSerialization(false) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... // ...
... // Here ...
... // Here we ...
...register our decorator ...
...our decorator ...
...decorator ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
... .withDecorators(Collections.singletonList( ...
....withDecorators(Collections.singletonList( ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... new ...
... new ClientTracingDecorator())) ...
... new ClientTracingDecorator())) ...
... new ClientTracingDecorator())) ...
...new ClientTracingDecorator())) ...
...ClientTracingDecorator())) ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... ...
... .build(); } Trace ...
... .build(); } Trace CDI ...
... .build(); } Trace CDI Beans MicroProfile-Opentracing ...
...class CustomRestResource { ... } Trace ...
...CustomRestResource { ... } Trace rest ...
...{ ... } Trace rest clients Unfortunately ...
...a custom tracing feature @RegisterRestClient(configKey = "externalResource") @RegisterProviders(@RegisterProvider(ClientTracingFeature.class)) @Path("/") public ...
...interface ExternalRestResource { ... } // If ...
...ExternalRestResource { ... } // If you ...

Anzeigen