Skip to content

Commit

Permalink
Ensure the compatibility of modifications to the RocketMQ Java client…
Browse files Browse the repository at this point in the history
… code with OpenTelemetry instrumentation
  • Loading branch information
aaron-ai committed Mar 31, 2023
1 parent 33f46a5 commit 6d98f97
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/java_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,22 @@ jobs:
- name: Build with Maven
working-directory: ./java
run: mvn -B package --file pom.xml
opentelemetry-compatibility:
name: "OpenTelemetry Instrumentation Compatibility Test"
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
repository: open-telemetry/opentelemetry-java-instrumentation
ref: main
- name: Use JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: "adopt"
cache: gradle
- name: Build Code
run: |
./gradlew :instrumentation:rocketmq:rocketmq-client:rocketmq-client-5.0:javaagent:test
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public static void main(String[] args) throws ClientException, IOException {
.setEndpoints(endpoints)
.setCredentialProvider(sessionCredentialsProvider)
.build();

String topic = "yourNormalTopic";
// In most case, you don't need to create too many producers, singleton pattern is recommended.
final Producer producer = provider.newProducerBuilder()
Expand Down

0 comments on commit 6d98f97

Please sign in to comment.