/** * Adds a handler for adding an OpenTracing Span to the routing context. * * @param router The router to add the handler to. * @param position The position to add the tracing handler at. */ private void addTracingHandler(final Router router, final int position) { final Map<String, String> customTags = new HashMap<>(); customTags.put(Tags.COMPONENT.getKey(), getTypeName()); addCustomTags(customTags); final List<WebSpanDecorator> decorators = new ArrayList<>(); decorators.add(new ComponentMetaDataDecorator(customTags)); addCustomSpanDecorators(decorators); final TracingHandler tracingHandler = new TracingHandler(tracer, decorators); router.route().order(position).handler(tracingHandler).failureHandler(tracingHandler); }
/** * Adds a handler for adding an OpenTracing Span to the routing context. * * @param router The router to add the handler to. * @param position The position to add the tracing handler at. */ private void addTracingHandler(final Router router, final int position) { final Map<String, String> customTags = new HashMap<>(); customTags.put(Tags.COMPONENT.getKey(), getTypeName()); addCustomTags(customTags); final List<WebSpanDecorator> decorators = new ArrayList<>(); decorators.add(new ComponentMetaDataDecorator(customTags)); addCustomSpanDecorators(decorators); final TracingHandler tracingHandler = new TracingHandler(tracer, decorators); router.route().order(position).handler(tracingHandler).failureHandler(tracingHandler); }
commandContext -> { Tags.COMPONENT.set(commandContext.getCurrentSpan(), getTypeName()); final Command command = commandContext.getCommand(); if (command.isValid()) {
commandContext -> { Tags.COMPONENT.set(commandContext.getCurrentSpan(), getTypeName()); final Command command = commandContext.getCommand(); if (command.isValid()) {
.asChildOf(TracingHandler.serverSpanContext(ctx)) .ignoreActiveSpan() .withTag(Tags.COMPONENT.getKey(), getTypeName()) .withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_CLIENT) .withTag(MessageHelper.APP_PROPERTY_TENANT_ID, tenant) final Future<Void> tenantEnabledTracker = getTenantConfiguration(tenant, currentSpan.context()) .compose(tenantObj -> { if (tenantObj.isAdapterEnabled(getTypeName())) { return Future.succeededFuture(); } else {
.asChildOf(TracingHandler.serverSpanContext(ctx)) .ignoreActiveSpan() .withTag(Tags.COMPONENT.getKey(), getTypeName()) .withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_CLIENT) .withTag(MessageHelper.APP_PROPERTY_TENANT_ID, tenant)
.asChildOf(TracingHandler.serverSpanContext(ctx)) .ignoreActiveSpan() .withTag(Tags.COMPONENT.getKey(), getTypeName()) .withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_CLIENT) .withTag(MessageHelper.APP_PROPERTY_TENANT_ID, tenant) if (tenantConfigTracker.result().isAdapterEnabled(getTypeName())) { final MessageSender sender = senderTracker.result();
.asChildOf(TracingHandler.serverSpanContext(ctx)) .ignoreActiveSpan() .withTag(Tags.COMPONENT.getKey(), getTypeName()) .withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_CLIENT) .withTag(MessageHelper.APP_PROPERTY_TENANT_ID, tenant) if (tenantConfigTracker.result().isAdapterEnabled(getTypeName())) { final MessageSender sender = senderTracker.result();