Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: version 2 #103

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: kind/bug
assignees: ''
---

- [ ] I have searched the [issues](https://github.com/reactivegroup/capa/issues) of this repository and believe that this is not a duplicate.
- [ ] I have searched the [issues](https://github.com/capa-cloud/capa-java/issues) of this repository and believe that this is not a duplicate.

### Environment

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ Capa API design follow community standards, please refer to the API definitions

The API definition is placed in the following independent warehouse, unbound from the Capa project, and hopes to develop into the community's API standard definition:

+ java: [cloud-runtimes-jvm](https://github.com/reactivegroup/cloud-runtimes-jvm)
+ python(alpha): [cloud-runtimes-python](https://github.com/reactivegroup/cloud-runtimes-python)
+ golang(alpha): [cloud-runtimes-golang](https://github.com/reactivegroup/cloud-runtimes-golang)
+ java: [cloud-runtimes-jvm](https://github.com/capa-cloud/cloud-runtimes-jvm)
+ python(alpha): [cloud-runtimes-python](https://github.com/capa-cloud/cloud-runtimes-python)
+ golang(alpha): [cloud-runtimes-golang](https://github.com/capa-cloud/cloud-runtimes-golang)

#### Why not use Dapr API directly?

Expand Down Expand Up @@ -120,7 +120,7 @@ For a Maven project, add the following to your pom.xml file:
<dependency>
<groupId>group.rxcloud</groupId>
<artifactId>capa-sdk</artifactId>
<version>1.0.7.RELEASE</version>
<version>2.12.1.RELEASE</version>
</dependency>
...
</dependencies>
Expand All @@ -140,7 +140,7 @@ Sample implementation library:
<dependency>
<groupId>group.rxcloud</groupId>
<artifactId>capa-sdk-spi-demo</artifactId>
<version>1.0.7.RELEASE</version>
<version>2.12.1.RELEASE</version>
</dependency>
...
</dependencies>
Expand All @@ -152,9 +152,9 @@ Sample implementation library:

Try the following examples to learn more about Capa's Java SDK:

* [capa-demo](https://github.com/reactivegroup/capa/tree/master/sdk-spi-demo)
* [capa-aws](https://github.com/reactivegroup/capa-aws)
* [capa-alibaba](https://github.com/reactivegroup/capa-alibaba)
* [capa-demo](https://github.com/capa-cloud/capa-java/tree/master/sdk-spi-demo)
* [capa-aws](https://github.com/capa-cloud/capa-java-aws)
* [capa-alibaba](https://github.com/capa-cloud/capa-java-alibaba)

### Low retrofit cost migration

Expand Down
16 changes: 8 additions & 8 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ Capa API设计follow社区标准,请参考 Dapr / Layotto 等开源项目的AP

API定义放置于以下独立仓库中,与Capa项目解绑,希望发展成为社区的API标准定义:

+ java: [cloud-runtimes-jvm](https://github.com/reactivegroup/cloud-runtimes-jvm)
+ python(alpha): [cloud-runtimes-python](https://github.com/reactivegroup/cloud-runtimes-python)
+ golang(alpha): [cloud-runtimes-golang](https://github.com/reactivegroup/cloud-runtimes-golang)
+ java: [cloud-runtimes-jvm](https://github.com/capa-cloud/cloud-runtimes-jvm)
+ python(alpha): [cloud-runtimes-python](https://github.com/capa-cloud/cloud-runtimes-python)
+ golang(alpha): [cloud-runtimes-golang](https://github.com/capa-cloud/cloud-runtimes-golang)

#### 为什么不直接使用Dapr API?

Expand Down Expand Up @@ -118,7 +118,7 @@ For a Maven project, add the following to your pom.xml file:
<dependency>
<groupId>group.rxcloud</groupId>
<artifactId>capa-sdk</artifactId>
<version>1.0.7.RELEASE</version>
<version>2.12.1.RELEASE</version>
</dependency>
...
</dependencies>
Expand All @@ -138,7 +138,7 @@ Sample implementation library:
<dependency>
<groupId>group.rxcloud</groupId>
<artifactId>capa-sdk-spi-demo</artifactId>
<version>1.0.7.RELEASE</version>
<version>2.12.1.RELEASE</version>
</dependency>
...
</dependencies>
Expand All @@ -150,9 +150,9 @@ Sample implementation library:

Try the following examples to learn more about Capa's Java SDK:

* [capa-demo](https://github.com/reactivegroup/capa/tree/master/sdk-spi-demo)
* [capa-aws](https://github.com/reactivegroup/capa-aws)
* [capa-alibaba](https://github.com/reactivegroup/capa-alibaba)
* [capa-demo](https://github.com/capa-cloud/capa-java/tree/master/sdk-spi-demo)
* [capa-aws](https://github.com/capa-cloud/capa-java-aws)
* [capa-alibaba](https://github.com/capa-cloud/capa-java-alibaba)

### 低改造成本迁移

Expand Down
13 changes: 4 additions & 9 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>capa-parent</artifactId>
<groupId>group.rxcloud</groupId>
<version>1.11.13.2.RELEASE</version>
<version>2.12.1.RELEASE</version>
</parent>

<artifactId>capa-examples</artifactId>
Expand All @@ -33,6 +33,7 @@
<properties>
<log4j.version>2.17.1</log4j.version>
<logback.version>1.2.10</logback.version>
<lombok.version>1.18.22</lombok.version>
</properties>

<dependencies>
Expand All @@ -52,12 +53,6 @@
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
<exclusions>
<exclusion>
<artifactId>log4j-api</artifactId>
<groupId>org.apache.logging.log4j</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- slf4j -->
<!-- <dependency>
Expand All @@ -72,11 +67,11 @@
<version>${logback.version}</version>
</dependency>

<!--lombok-->
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.2</version>
<version>${lombok.version}</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ public class DemoLog {
public static void main(String[] args) {
try {
log.info("test");
}catch (Exception e){
} catch (Exception e) {
System.out.println();
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,18 @@ public static void main(String[] args) throws InterruptedException {

// tracer
Tracer tracer = capaTelemetryClient.buildTracer("tracer-test")
.block();
.block();

LongCounter counter = capaTelemetryClient.buildMeter("meter-test")
.block()
.counterBuilder("counter-test")
.build();
.block()
.counterBuilder("counter-test")
.build();

Span span = tracer.spanBuilder("span-test")
.setAttribute("key1", 1)
.setAttribute("key2", 2)
.startSpan();
.setAttribute("key1", 1)
.setAttribute("key2", 2)
.startSpan();

// working
for (int i = 0; i < 50; i++) {
Thread.sleep(200);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class TraceProcessor implements SpanProcessor {

@Override
public void onStart(Context context, ReadWriteSpan span) {

}

@Override
Expand Down
123 changes: 101 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
<groupId>group.rxcloud</groupId>
<artifactId>capa-parent</artifactId>
<packaging>pom</packaging>
<version>1.11.13.2.RELEASE</version>
<version>2.12.1.RELEASE</version>
<name>capa-sdk-parent</name>
<description>SDK for Capa.</description>
<url>https://github.com/reactivegroup</url>
<url>https://github.com/capa-cloud</url>

<licenses>
<license>
Expand All @@ -51,9 +51,9 @@
</developers>

<scm>
<connection>scm:git:git@github.com:reactivegroup/capa.git</connection>
<developerConnection>scm:git:git@github.com:reactivegroup/capa.git</developerConnection>
<url>git@github.com:reactivegroup/capa.git</url>
<connection>scm:git:git@github.com:capa-cloud/capa.git</connection>
<developerConnection>scm:git:git@github.com:capa-cloud/capa.git</developerConnection>
<url>git@github.com:capa-cloud/capa.git</url>
</scm>

<distributionManagement>
Expand Down Expand Up @@ -81,17 +81,29 @@
<java.version>8</java.version>
<file.encoding>UTF-8</file.encoding>
<maven.version>3.8.1</maven.version>
<cloud-runtimes.version>1.11.RELEASE</cloud-runtimes.version>

<!-- core -->
<cloud-runtimes.version>1.15.RELEASE</cloud-runtimes.version>
<reactor-core.version>3.3.22.RELEASE</reactor-core.version>
<slf4j.version>1.7.21</slf4j.version>
<grpc.version>1.39.0</grpc.version>
<jackson.version>2.12.4</jackson.version>
<slf4j.version>1.7.36</slf4j.version>
<vavr.version>0.10.4</vavr.version>
<vrml.version>1.0.8</vrml.version>
<open.telemetry.version>1.9.0</open.telemetry.version>
<open.telemetry.version.alpha>1.9.0-alpha</open.telemetry.version.alpha>
<okhttp.version>4.9.1</okhttp.version>
<kotlin-stdlib.version>1.4.10</kotlin-stdlib.version>
<log4j.version>2.17.1</log4j.version>
<logback.version>1.2.10</logback.version>
<jackson.version>2.13.2.2</jackson.version>
<grpc.version>1.45.1</grpc.version>
<gson.version>2.9.0</gson.version>

<!-- test -->
<junit.version>5.3.1</junit.version>
<mockito-core.version>3.6.0</mockito-core.version>
<powermock.version>2.0.2</powermock.version>

<!-- plugin -->
<checkstyle.version>3.1.2</checkstyle.version>
<apache.rat.version>0.13</apache.rat.version>
<cobertura.maven.version>2.7</cobertura.maven.version>
Expand Down Expand Up @@ -137,46 +149,113 @@
<groupId>group.rxcloud</groupId>
<artifactId>cloud-runtimes-api</artifactId>
<version>${cloud-runtimes.version}</version>
<optional>true</optional>
</dependency>

<!-- reactor -->
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>${reactor-core.version}</version>
<optional>true</optional>
</dependency>

<!-- slf4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<optional>true</optional>
</dependency>
<!-- log4j -->
<!-- log4j-slf4j-impl and logback-classic cannot exist at the same time. -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
<optional>true</optional>
</dependency>
<!-- logback -->
<!-- log4j-slf4j-impl and logback-classic cannot exist at the same time. -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<optional>true</optional>
</dependency>
<!-- open-telemetry-api -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
<version>${open.telemetry.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api-metrics</artifactId>
<version>${open.telemetry.version.alpha}</version>
<optional>true</optional>
</dependency>
<!-- vrml -->
<dependency>
<groupId>group.rxcloud</groupId>
<artifactId>vrml</artifactId>
<version>${vrml.version}</version>
<type>pom</type>
<scope>import</scope>
<optional>true</optional>
</dependency>
<!-- vavr -->
<dependency>
<groupId>io.vavr</groupId>
<artifactId>vavr</artifactId>
<version>${vavr.version}</version>
<optional>true</optional>
</dependency>

<!-- serialize -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
<optional>true</optional>
</dependency>

<!-- grpc -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>${grpc.version}</version>
</dependency>

<!-- open-telemetry-api -->
</dependency>
<!-- gson -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
<version>${open.telemetry.version}</version>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
<optional>true</optional>
</dependency>
<!-- okhttp -->
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api-metrics</artifactId>
<version>${open.telemetry.version.alpha}</version>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>${okhttp.version}</version>
<optional>true</optional>
</dependency>
<!-- kotlin -->
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin-stdlib.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
<version>${kotlin-stdlib.version}</version>
<optional>true</optional>
</dependency>

<!-- unit test -->
Expand Down Expand Up @@ -335,7 +414,7 @@
<exclude>**/*.load</exclude>
<exclude>**/*.flex</exclude>
<exclude>**/*.fc</exclude>
<exclude>**/*.properties</exclude>
<exclude>**/*.constants</exclude>
<exclude>**/*.sh</exclude>
<exclude>**/*.bat</exclude>
<exclude>**/*.md</exclude>
Expand Down
Loading