org.apache.kafka.streams.kstream.ValueTransformerWithKey Java Examples
The following examples show how to use
org.apache.kafka.streams.kstream.ValueTransformerWithKey.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TracingValueTransformerWithKey.java From brave with Apache License 2.0 | 5 votes |
TracingValueTransformerWithKey(KafkaStreamsTracing kafkaStreamsTracing, String spanName, ValueTransformerWithKey<K, V, VR> delegateTransformer) { this.kafkaStreamsTracing = kafkaStreamsTracing; this.tracer = kafkaStreamsTracing.tracer; this.spanName = spanName; this.delegateTransformer = delegateTransformer; }
Example #2
Source File: KafkaStreamsTracingTest.java From brave with Apache License 2.0 | 5 votes |
@Test public void valueTransformWithKeySupplier_should_tag_app_id_and_task_id() { ValueTransformerWithKey<String, String, String> processor = fakeValueTransformerWithKeySupplier.get(); processor.init(processorContextSupplier.apply(new RecordHeaders())); processor.transform(TEST_KEY, TEST_VALUE); assertThat(spans.get(0).tags()) .containsOnly( entry("kafka.streams.application.id", TEST_APPLICATION_ID), entry("kafka.streams.task.id", TEST_TASK_ID)); }
Example #3
Source File: TracingValueTransformerWithKeySupplier.java From brave with Apache License 2.0 | 4 votes |
/** This wraps transform method to enable tracing. */ @Override public ValueTransformerWithKey<K, V, VR> get() { return new TracingValueTransformerWithKey<>(kafkaStreamsTracing, spanName, delegateTransformerSupplier.get()); }
Example #4
Source File: TracingFilterValueTransformerWithKeySupplier.java From brave with Apache License 2.0 | 4 votes |
@Override public ValueTransformerWithKey<K, V, V> get() { return new TracingFilterValueTransformerWithKey<>(kafkaStreamsTracing, spanName, delegatePredicate, filterNot); }