Skip to content

Commit ddcba88

Browse files
committed
format
1 parent 468f1a8 commit ddcba88

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.0.0-SNAPSHOT] - 2025-11-11
98

10-
### Added
9+
## [0.1.1] - 2025-11-11
10+
### Changed
11+
- **Cozeloop Client**: Support get workspace id and token from env
12+
1113

14+
## [0.1.0] - 2025-11-11
15+
### Added
1216
- Initial CozeLoop Java SDK release
1317
- Core SDK module (`cozeloop-core`) with trace reporting and prompt management
1418
- Spring Boot starter module (`cozeloop-spring-boot-starter`) for seamless integration
@@ -30,15 +34,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3034
- Checkstyle configuration for code quality
3135

3236
### Changed
33-
3437
- **Trace Export**: Improved `CozeLoopSpanExporter` to export spans in batches of 25 to remote server
3538
- Spans are now automatically split into batches of 25 before sending to CozeLoop platform
3639
- Enhanced error handling: individual batch failures don't prevent other batches from being exported
3740
- Improved logging with batch-level statistics and detailed error reporting
3841
- Better resilience and observability for trace export operations
3942

4043
### Features
41-
4244
- **Trace Reporting**: Automatic batch reporting of traces to CozeLoop platform
4345
- Multi-level batching: OpenTelemetry BatchSpanProcessor + custom 25-span batches
4446
- Robust error handling with per-batch failure isolation

cozeloop-core/src/main/java/com/coze/loop/client/CozeLoopClientBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ public CozeLoopClientBuilder() {
2626
private void loadByEnv() {
2727
// Load workspace ID
2828
String workspaceId = System.getenv("COZELOOP_WORKSPACE_ID");
29-
if (workspaceId!= null) {
29+
if (workspaceId != null) {
3030
this.config.setWorkspaceId(workspaceId);
3131
}
3232
// Load service name
3333
String serviceName = System.getenv("COZELOOP_SERVICE_NAME");
34-
if (serviceName!= null) {
34+
if (serviceName != null) {
3535
this.config.setServiceName(serviceName);
3636
}
3737
// Load auth token
3838
String token = System.getenv("COZELOOP_API_TOKEN");
39-
if (token!= null) {
39+
if (token != null) {
4040
this.tokenAuth(token);
4141
}
4242
// Load JWT auth
4343
String clientId = System.getenv("COZELOOP_JWT_OAUTH_CLIENT_ID");
4444
String privateKey = System.getenv("COZELOOP_JWT_OAUTH_PRIVATE_KEY");
4545
String publicKeyId = System.getenv("COZELOOP_JWT_OAUTH_PUBLIC_KEY_ID");
46-
if (clientId!= null && privateKey!= null && publicKeyId!= null) {
46+
if (clientId != null && privateKey != null && publicKeyId != null) {
4747
this.jwtOAuth(clientId, privateKey, publicKeyId);
4848
}
4949
}
@@ -70,7 +70,7 @@ private void loadByProperties() {
7070
String clientId = ConfigUtils.get("cozeloop.auth.jwt.client-id");
7171
String privateKey = ConfigUtils.get("cozeloop.auth.jwt.private-key");
7272
String publicKeyId = ConfigUtils.get("cozeloop.auth.jwt.public-key-id");
73-
if (clientId!= null && privateKey!= null && publicKeyId!= null) {
73+
if (clientId != null && privateKey != null && publicKeyId != null) {
7474
this.jwtOAuth(clientId, privateKey, publicKeyId);
7575
}
7676
}

examples/src/main/java/trace/annotation/AnnotationTraceExample.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ public class AnnotationTraceExample {
2424
public static void main(String[] args) {
2525
// Set environment variables for the example
2626
// In a real application, these would be in application.yml or environment variables
27-
// workspaceId and apiToken from property are set to client automatically, you also can set in application.yml
27+
// workspaceId and apiToken from property are set to client automatically, you also can set in
28+
// application.yml
2829
System.setProperty("cozeloop.workspace-id", "****");
29-
System.setProperty(
30-
"cozeloop.auth.token",
31-
"pat_***");
30+
System.setProperty("cozeloop.auth.token", "pat_***");
3231

3332
ConfigurableApplicationContext context =
3433
SpringApplication.run(AnnotationTraceExample.class, args);

0 commit comments

Comments
 (0)