Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

feat: add support for tailLogEntry API#627

Merged
minherz merged 34 commits intomasterfrom
minherz/tailLogEntry-api
Sep 17, 2021
Merged

feat: add support for tailLogEntry API#627
minherz merged 34 commits intomasterfrom
minherz/tailLogEntry-api

Conversation

@minherz
Copy link
Copy Markdown
Contributor

@minherz minherz commented Aug 17, 2021

Implements tailLogEntry API that exposes entries.tail API for end users. The API is in Beta yet and does not support resuming and retrying mechanisms.

Fixes #592

@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 17, 2021
@product-auto-label product-auto-label Bot added the api: logging Issues related to the googleapis/java-logging API. label Aug 17, 2021
@simonz130 simonz130 self-requested a review August 18, 2021 23:07
@minherz minherz force-pushed the minherz/tailLogEntry-api branch 2 times, most recently from 11de83b to 51b270d Compare September 6, 2021 10:01
@minherz minherz force-pushed the minherz/tailLogEntry-api branch from 9ee740f to e48d4ac Compare September 12, 2021 09:40
minherz and others added 16 commits September 13, 2021 10:21
use BidiStream to iterate through responses
instead of implementing callback approach using BidiStreamObserver
…660)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `22.0.0` -> `23.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/compatibility-slim/22.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/confidence-slim/22.0.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-logging).
…onfig to v1.0.2 (#668)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.0.1` -> `1.0.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.0.2/compatibility-slim/1.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.0.2/confidence-slim/1.0.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-shared-config</summary>

### [`v1.0.2`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#&#8203;102-httpswwwgithubcomgoogleapisjava-shared-configcomparev101v102-2021-09-13)

[Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.0.1...v1.0.2)

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-logging).
…cies to v2.2.1 (#667)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.2.0` -> `2.2.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.2.1/compatibility-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.2.1/confidence-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-shared-dependencies</summary>

### [`v2.2.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#&#8203;221-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare220v221-2021-09-13)

[Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.2.0...v2.2.1)

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-logging).
provide an explanation about synchronous and asynchronous modes for writing log entries and how the mode can be configured.

Fixes #665
adjust Option class name to follow existing naming convention.
remove Callable suffix from the API method name
add the new method to the "ignore diffs" list for clirr
Defines and implements tailLogEntries() API for streaming fresh log entries.

Fixes #592
Renames cancel() to be close()
use BidiStream to iterate through responses
instead of implementing callback approach using BidiStreamObserver
adjust Option class name to follow existing naming convention.
change interface signature to better reflect roles of the interfaces;
update unit testing to validate TailOption
@generated-files-bot
Copy link
Copy Markdown

Warning: This pull request is touching the following templated files:

  • samples/snippets/pom.xml

posting failing test as a placeholder. the test does not work because gax.rpc fails to work with stream
refactor the IT code to move delete logs into BaseSystemTest
reuse methods and members of BaseSystemTest
format IT code
there is a problem with passing double quotes in the string parameter via grpc.
neither "\"" nor "\\\"" that produce " and \" respectively works as desired
add unit test to verify send(TailLogEntriesRequest) method get called.
apply formatting for IT test
setup delay in 10 seconds to eliminate any test flakiness
validate the test using only values that were explicitly defined in log entry
@minherz minherz marked this pull request as ready for review September 16, 2021 18:33
@minherz minherz requested review from a team September 16, 2021 18:33
Copy link
Copy Markdown

@simonz130 simonz130 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very solid PR. Thanks @minherz!

return listLogEntriesAsync(getOptions(), optionMap(options));
}

static TailLogEntriesRequest tailLogEntriesRequest(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not private for testing purposes?
I suggest you rename it to createTailLogEntriesRequest or buildTailLogEntriesRequest to follow conventions for builder method names.

Copy link
Copy Markdown
Contributor Author

@minherz minherz Sep 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not private for testing purposes?

Yes. Similarly to listLogEntriesRequest().
I will rename it. The old habbit to keep the code homogeneous including naming convention dies hard.

@minherz
Copy link
Copy Markdown
Contributor Author

minherz commented Sep 17, 2021

@simonz130 I will apply all you comments in PR #628 to avoid another review cycle.

@minherz minherz merged commit 5a7845a into master Sep 17, 2021
@minherz minherz deleted the minherz/tailLogEntry-api branch September 17, 2021 06:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: logging Issues related to the googleapis/java-logging API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Implement user friendly interface for tailLogEntries API

3 participants