Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

fix: Shutdown Stackdriver MetricServiceClient properly #2091

Merged

Conversation

janhicken
Copy link
Contributor

Using the default configuration of StackdriverStatsConfiguration, a MetricServiceClient is initialized by the StackdriverStatsExporter.

This client was never closed, this will be done now when the StackdriverStatsExporter.unregister() method is called.

If a custom MetricServiceStub is given by the user, it will not be closed as the user should be in charge of it.

This should fix #2007.

Using the default configuration of StackdriverStatsConfiguration, a
MetricServiceClient is initialized by the StackdriverStatsExporter.

This client was never closed, this will be done now when the
.unregister() method is called on the exporter.

If a custom MetricServiceStub is given by the user, it will *not* be
closed as the user should be in charge of it.
@janhicken janhicken requested review from rghetia, songy23 and a team as code owners January 12, 2022 14:12
@punya punya merged commit 81225af into census-instrumentation:master Jan 13, 2022
gcf-merge-on-green bot referenced this pull request in googleapis/java-spanner Feb 2, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.opencensus:opencensus-contrib-grpc-metrics](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-metrics/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-metrics/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-metrics/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-metrics/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |
| [io.opencensus:opencensus-exporter-stats-stackdriver](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-stats-stackdriver/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-stats-stackdriver/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-stats-stackdriver/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-stats-stackdriver/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |
| [io.opencensus:opencensus-exporter-trace-stackdriver](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-trace-stackdriver/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-trace-stackdriver/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-trace-stackdriver/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-exporter-trace-stackdriver/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |
| [io.opencensus:opencensus-contrib-zpages](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-zpages/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-zpages/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-zpages/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-zpages/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |
| [io.opencensus:opencensus-impl](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |
| [io.opencensus:opencensus-api](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |
| [io.opencensus:opencensus-contrib-grpc-util](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-util/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-util/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-util/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-grpc-util/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>census-instrumentation/opencensus-java</summary>

### [`v0.31.0`](https://github.com/census-instrumentation/opencensus-java/releases/v0.31.0)

[Compare Source](https://github.com/census-instrumentation/opencensus-java/compare/v0.30.0...v0.31.0)

-   fix: Shutdown Stackdriver MetricServiceClient properly by [@&#8203;janhicken](https://github.com/janhicken) in [https://github.com/census-instrumentation/opencensus-java/pull/2091](https://github.com/census-instrumentation/opencensus-java/pull/2091)
-   implement gRPC client retry stats measures and views by [@&#8203;mackenziestarr](https://github.com/mackenziestarr) in [https://github.com/census-instrumentation/opencensus-java/pull/2084](https://github.com/census-instrumentation/opencensus-java/pull/2084)

**Full Changelog**: census-instrumentation/opencensus-java@v0.29.0...v0.31.0

</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 these updates again.

---

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

---

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-spanner).
gcf-merge-on-green bot referenced this pull request in googleapis/google-http-java-client Feb 9, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.opencensus:opencensus-testing](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |
| [io.opencensus:opencensus-impl](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |
| [io.opencensus:opencensus-contrib-http-util](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |
| [io.opencensus:opencensus-api](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>census-instrumentation/opencensus-java</summary>

### [`v0.31.0`](https://github.com/census-instrumentation/opencensus-java/releases/v0.31.0)

[Compare Source](https://github.com/census-instrumentation/opencensus-java/compare/v0.30.0...v0.31.0)

-   fix: Shutdown Stackdriver MetricServiceClient properly by [@&#8203;janhicken](https://github.com/janhicken) in [https://github.com/census-instrumentation/opencensus-java/pull/2091](https://github.com/census-instrumentation/opencensus-java/pull/2091)
-   implement gRPC client retry stats measures and views by [@&#8203;mackenziestarr](https://github.com/mackenziestarr) in [https://github.com/census-instrumentation/opencensus-java/pull/2084](https://github.com/census-instrumentation/opencensus-java/pull/2084)

**Full Changelog**: census-instrumentation/opencensus-java@v0.29.0...v0.31.0

</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 these updates again.

---

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

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StackdriverStatsExporter does not shut down the MetricServiceClient
2 participants