Merge remote-tracking branch 'origin' into 3.1.x
This commit is contained in:
64
.github/workflows/maven.yml
vendored
64
.github/workflows/maven.yml
vendored
@@ -1,32 +1,32 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 3.1.x ]
|
||||
pull_request:
|
||||
branches: [ 3.1.x ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: ["8", "11", "16"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: ${{ matrix.java }}
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: Build with Maven
|
||||
run: ./mvnw clean install -B -U -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 3.1.x ]
|
||||
pull_request:
|
||||
branches: [ 3.1.x ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: ["8", "11", "16"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: ${{ matrix.java }}
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: Build with Maven
|
||||
run: ./mvnw clean install -B -U -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
|
||||
|
||||
@@ -64,6 +64,10 @@ public class SleuthKafkaAspect {
|
||||
private void anyProducerFactory() {
|
||||
} // NOSONAR
|
||||
|
||||
@Pointcut("execution(public * org.springframework.kafka.core.ProducerFactory.createNonTransactionalProducer(..))")
|
||||
private void anyNonTransactionalProducerFactory() {
|
||||
} // NOSONAR
|
||||
|
||||
@Pointcut("execution(public * org.springframework.kafka.core.ConsumerFactory.createConsumer(..))")
|
||||
private void anyConsumerFactory() {
|
||||
} // NOSONAR
|
||||
@@ -76,7 +80,7 @@ public class SleuthKafkaAspect {
|
||||
private void anyCreateContainer() {
|
||||
} // NOSONAR
|
||||
|
||||
@Around("anyProducerFactory()")
|
||||
@Around("anyProducerFactory() || anyNonTransactionalProducerFactory()")
|
||||
public Object wrapProducerFactory(ProceedingJoinPoint pjp) throws Throwable {
|
||||
Producer producer = (Producer) pjp.proceed();
|
||||
return this.kafkaTracing.producer(producer);
|
||||
|
||||
@@ -96,6 +96,10 @@ public class BraveMessagingAutoConfigurationTests {
|
||||
public void should_wrap_kafka() {
|
||||
this.producerFactory.createProducer();
|
||||
then(this.mySleuthKafkaAspect.producerWrapped).isTrue();
|
||||
this.mySleuthKafkaAspect.producerWrapped = false;
|
||||
|
||||
this.producerFactory.createNonTransactionalProducer();
|
||||
then(this.mySleuthKafkaAspect.producerWrapped).isTrue();
|
||||
|
||||
this.consumerFactory.createConsumer();
|
||||
then(this.mySleuthKafkaAspect.consumerWrapped).isTrue();
|
||||
|
||||
Reference in New Issue
Block a user