Skip to content

Commit fab063c

Browse files
committed
docs: Add deprecation notes
1 parent 9d7b63a commit fab063c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,41 @@ The `cf-java-client` project is a Java language binding for interacting with a C
1717
## Versions
1818
The Cloud Foundry Java Client has two active versions. The `5.x` line is compatible with Spring Boot `2.4.x - 2.6.x` just to manage its dependencies, while the `4.x` line uses Spring Boot `2.3.x`.
1919

20+
## Deprecations
21+
22+
### `DopplerClient.recentLogs()` — Recent Logs via Doppler
23+
24+
> [!WARNING]
25+
> **Deprecated since cf-java-client `5.17.x`**
26+
>
27+
> The `DopplerClient.recentLogs()` endpoint (and the related `RecentLogsRequest` / `LogMessage` types from the `org.cloudfoundry.doppler` package) are **deprecated** and will be removed in a future release.
28+
>
29+
> This API relies on the [Loggregator][loggregator] Doppler/Traffic Controller endpoint `/apps/{id}/recentlogs`, which was removed in **Loggregator ≥ 107.0**.
30+
> The affected platform versions are:
31+
>
32+
> | Platform | Last version with Doppler recent-logs support |
33+
> | -------- | --------------------------------------------- |
34+
> | CF Deployment (CFD) | `< 24.3` |
35+
> | Tanzu Application Service (TAS) | `< 4.0` |
36+
>
37+
> **Migration:** Replace any call to `DopplerClient.recentLogs()` with [`LogCacheClient.read()`][log-cache-api] (available via `org.cloudfoundry.logcache.v1.LogCacheClient`).
38+
>
39+
> ```java
40+
> // Before (deprecated)
41+
> dopplerClient.recentLogs(RecentLogsRequest.builder()
42+
> .applicationId(appId)
43+
> .build());
44+
>
45+
> // After
46+
> logCacheClient.read(ReadRequest.builder()
47+
> .sourceId(appId)
48+
> .envelopeTypes(EnvelopeType.LOG)
49+
> .build());
50+
> ```
51+
52+
[loggregator]: https://github.com/cloudfoundry/loggregator
53+
[log-cache-api]: https://github.com/cloudfoundry/log-cache
54+
2055
## Dependencies
2156
Most projects will need two dependencies; the Operations API and an implementation of the Client API. For Maven, the dependencies would be defined like this:
2257
@@ -76,6 +111,9 @@ Both the `cloudfoundry-operations` and `cloudfoundry-client` projects follow a [
76111

77112
### `CloudFoundryClient`, `DopplerClient`, `UaaClient` Builders
78113

114+
> [!NOTE]
115+
> **`DopplerClient` — partial deprecation:** The `recentLogs()` method on `DopplerClient` is deprecated and only works against Loggregator \< 107.0 (CFD \< 24.3 / TAS \< 4.0). See the [Deprecations](#deprecations) section above for the migration path to `LogCacheClient`.
116+
79117
The lowest-level building blocks of the API are `ConnectionContext` and `TokenProvider`. These types are intended to be shared between instances of the clients, and come with out of the box implementations. To instantiate them, you configure them with builders:
80118

81119
```java

0 commit comments

Comments
 (0)