I am using java 11 with spring boot version 2.1.0.RELEASE
i am using newrelic-api version 6.0.0
I have integrated with kafka using spring-streams, and i need to monitor this stream transactions on new relic
i have defined the kstream bean like
@Bean("smppIntegrationEventStreamTopology") @Trace(metricName = "SmppIntegrationEventStream", dispatcher = true) @SuppressWarnings("unchecked") public KStream<String, NotificationEvent> smppIntegrationEventStream(final StreamsBuilder eventStreamBuilder) { final var eventConsumed = Consumed.with(Serdes.String(), new JsonSerde<>(SmppIntegrationEvent.class, objectMapper)); final var eventStream = eventStreamBuilder.stream(smppIntegrationConfiguration.getStreamTopics(), eventConsumed) .filter(validEvent()) .flatMapValues(notificationEventValueMapper); NewRelic.getAgent().getTransaction().createDistributedTracePayload() final var notificationEventProduced = Produced.with(Serdes.String(), new JsonSerde<>(NotificationEvent.class, objectMapper)); final var apiNotificationEventStream = eventStream.filter((key, event) -> event.getChannels().stream() .anyMatch(notificationChannelData -> notificationChannelData.getChannel().equals("API"))) .branch(corruptNotificationEventPredicate, priorityEventPredicate(), normalEventPredicate()); apiNotificationEventStream[0].to(TOPIC_NOTIFICATION_DLQ_EVENTS, notificationEventProduced); apiNotificationEventStream[1].to(TOPIC_NOTIFICATION_API_PRIORITY_EVENTS, notificationEventProduced); apiNotificationEventStream[2].to(TOPIC_NOTIFICATION_API_EVENTS, notificationEventProduced); return eventStream; }
but i got 1 transaction when the application is started any solution how can i get the stream transactions on newrelic