Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[GCP Observability C++] De-experimentalize API #32715

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

Merged
merged 15 commits into from
Apr 5, 2023

Conversation

yashykt
Copy link
Member

@yashykt yashykt commented Mar 24, 2023

This PR aims to de-experimentalize the APIs for GCP Observability.

We would have ideally wanted public feedback before declaring the APIs stable, but we need stable APIs for GA.

Changes made after API review with @markdroth @veblush, @ctiller and the entire Core/C++ team -

  • The old experimental APIs grpc::experimental::GcpObservabilityInit and grpc::experimental::GcpObservabilityClose are now deprecated and will be deleted after v.1.55 release.
  • The new API gets rid of the Close method and follows the RAII idiom with a single grpc::GcpObservability::Init() call that returns an GcpObservability object, the lifetime of which controls when observability data is flushed.
  • The GcpObservability class could in the future add more methods. For example, a debug method that shows the current configuration.
  • Document that GcpObservability initialization and flushing (on GcpObservability destruction) are blocking calls.
  • Document that gRPC is still usable if GcpObservability initialization failed. (Added a test to prove the same).
  • Since we don't have a good way to flush stats and tracing with OpenCensus, the examples required users to sleep for 25 seconds. This sleep is now part of GcpObservability destruction.

Additional Implementation details -

  • GcpObservability::Init is now marked with GRPC_MUST_USE_RESULT to make sure that the results are used. We ideally want users to store it, but this is better than nothing.
  • Added a note on GCP Observability lifetime guarantees.

@yashykt yashykt requested a review from ctiller March 30, 2023 20:23
@yashykt yashykt changed the title GcpObservability C++: De-experimentalize API [GcpObservability C++] De-experimentalize API Mar 30, 2023
include/grpcpp/ext/gcp_observability.h Outdated Show resolved Hide resolved
include/grpcpp/ext/gcp_observability.h Outdated Show resolved Hide resolved
include/grpcpp/ext/gcp_observability.h Outdated Show resolved Hide resolved
include/grpcpp/ext/gcp_observability.h Outdated Show resolved Hide resolved
include/grpcpp/ext/gcp_observability.h Outdated Show resolved Hide resolved
include/grpcpp/ext/gcp_observability.h Outdated Show resolved Hide resolved
include/grpcpp/ext/gcp_observability.h Outdated Show resolved Hide resolved
include/grpcpp/ext/gcp_observability.h Outdated Show resolved Hide resolved
include/grpcpp/ext/gcp_observability.h Show resolved Hide resolved
Copy link
Member

@ctiller ctiller left a comment

Choose a reason for hiding this comment

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

I think we need a little more explanation on the RAII behavior (added a comment), but otherwise this looks good.

@yashykt
Copy link
Member Author

yashykt commented Apr 5, 2023

Thanks for providing reviews at such short notices! 🙏

@yashykt yashykt enabled auto-merge (squash) April 5, 2023 20:38
@yashykt yashykt changed the title [GcpObservability C++] De-experimentalize API [GCP Observability C++] De-experimentalize API Apr 5, 2023
@yashykt yashykt merged commit bdd1ac4 into grpc:master Apr 5, 2023
yashykt added a commit to yashykt/grpc that referenced this pull request Apr 5, 2023
This PR aims to de-experimentalize the APIs for GCP Observability. 

We would have ideally wanted public feedback before declaring the APIs
stable, but we need stable APIs for GA.

Changes made after API review with @markdroth @veblush, @ctiller and the
entire Core/C++ team -
* The old experimental APIs `grpc::experimental::GcpObservabilityInit`
and `grpc::experimental::GcpObservabilityClose` are now deprecated and
will be deleted after v.1.55 release.
* The new API gets rid of the Close method and follows the RAII idiom
with a single `grpc::GcpObservability::Init()` call that returns an
`GcpObservability` object, the lifetime of which controls when
observability data is flushed.
* The `GcpObservability` class could in the future add more methods. For
example, a debug method that shows the current configuration.
* Document that GcpObservability initialization and flushing (on
`GcpObservability` destruction) are blocking calls.
* Document that gRPC is still usable if GcpObservability initialization
failed. (Added a test to prove the same).
* Since we don't have a good way to flush stats and tracing with
OpenCensus, the examples required users to sleep for 25 seconds. This
sleep is now part of `GcpObservability` destruction.

Additional Implementation details -
* `GcpObservability::Init` is now marked with `GRPC_MUST_USE_RESULT` to
make sure that the results are used. We ideally want users to store it,
but this is better than nothing.
* Added a note on GCP Observability lifetime guarantees.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
yashykt added a commit that referenced this pull request Apr 5, 2023
)

This PR aims to de-experimentalize the APIs for GCP Observability. 

We would have ideally wanted public feedback before declaring the APIs
stable, but we need stable APIs for GA.

Changes made after API review with @markdroth @veblush, @ctiller and the
entire Core/C++ team -
* The old experimental APIs `grpc::experimental::GcpObservabilityInit`
and `grpc::experimental::GcpObservabilityClose` are now deprecated and
will be deleted after v.1.55 release.
* The new API gets rid of the Close method and follows the RAII idiom
with a single `grpc::GcpObservability::Init()` call that returns an
`GcpObservability` object, the lifetime of which controls when
observability data is flushed.
* The `GcpObservability` class could in the future add more methods. For
example, a debug method that shows the current configuration.
* Document that GcpObservability initialization and flushing (on
`GcpObservability` destruction) are blocking calls.
* Document that gRPC is still usable if GcpObservability initialization
failed. (Added a test to prove the same).
* Since we don't have a good way to flush stats and tracing with
OpenCensus, the examples required users to sleep for 25 seconds. This
sleep is now part of `GcpObservability` destruction.

Additional Implementation details -
* `GcpObservability::Init` is now marked with `GRPC_MUST_USE_RESULT` to
make sure that the results are used. We ideally want users to store it,
but this is better than nothing.
* Added a note on GCP Observability lifetime guarantees.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->




<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
stanley-cheung added a commit that referenced this pull request Apr 6, 2023
.. as it is now part of the `GcpObservabilityClose()` routine
[itself](https://github.com/grpc/grpc/pull/32715/files#diff-e1ce0ccb4650e20b62a6d6b31655f446ad9ef72efca5849143e65f4a5a5e0310R223).

Background: #32715 may have broken the CI for observability interop
testing. The client seems to be taking too long to finish. More info at
b/277145074

We need to backport this to the `v1.54.x` branch if this is the right
fix.
stanley-cheung added a commit to stanley-cheung/grpc that referenced this pull request Apr 6, 2023
…32817)

.. as it is now part of the `GcpObservabilityClose()` routine
[itself](https://github.com/grpc/grpc/pull/32715/files#diff-e1ce0ccb4650e20b62a6d6b31655f446ad9ef72efca5849143e65f4a5a5e0310R223).

Background: grpc#32715 may have broken the CI for observability interop
testing. The client seems to be taking too long to finish. More info at
b/277145074

We need to backport this to the `v1.54.x` branch if this is the right
fix.
stanley-cheung added a commit that referenced this pull request Apr 6, 2023
Backport of #32817 

.. as it is now part of the `GcpObservabilityClose()` routine
[itself](https://github.com/grpc/grpc/pull/32715/files#diff-e1ce0ccb4650e20b62a6d6b31655f446ad9ef72efca5849143e65f4a5a5e0310R223).

Background: #32715 may have broken the CI for observability interop
testing. The client seems to be taking too long to finish. More info at
b/277145074

We need to backport this to the `v1.54.x` branch.
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Apr 6, 2023
XuanWang-Amos pushed a commit to XuanWang-Amos/grpc that referenced this pull request May 1, 2023
This PR aims to de-experimentalize the APIs for GCP Observability. 

We would have ideally wanted public feedback before declaring the APIs
stable, but we need stable APIs for GA.

Changes made after API review with @markdroth @veblush, @ctiller and the
entire Core/C++ team -
* The old experimental APIs `grpc::experimental::GcpObservabilityInit`
and `grpc::experimental::GcpObservabilityClose` are now deprecated and
will be deleted after v.1.55 release.
* The new API gets rid of the Close method and follows the RAII idiom
with a single `grpc::GcpObservability::Init()` call that returns an
`GcpObservability` object, the lifetime of which controls when
observability data is flushed.
* The `GcpObservability` class could in the future add more methods. For
example, a debug method that shows the current configuration.
* Document that GcpObservability initialization and flushing (on
`GcpObservability` destruction) are blocking calls.
* Document that gRPC is still usable if GcpObservability initialization
failed. (Added a test to prove the same).
* Since we don't have a good way to flush stats and tracing with
OpenCensus, the examples required users to sleep for 25 seconds. This
sleep is now part of `GcpObservability` destruction.

Additional Implementation details -
* `GcpObservability::Init` is now marked with `GRPC_MUST_USE_RESULT` to
make sure that the results are used. We ideally want users to store it,
but this is better than nothing.
* Added a note on GCP Observability lifetime guarantees.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
XuanWang-Amos pushed a commit to XuanWang-Amos/grpc that referenced this pull request May 1, 2023
…32817)

.. as it is now part of the `GcpObservabilityClose()` routine
[itself](https://github.com/grpc/grpc/pull/32715/files#diff-e1ce0ccb4650e20b62a6d6b31655f446ad9ef72efca5849143e65f4a5a5e0310R223).

Background: grpc#32715 may have broken the CI for observability interop
testing. The client seems to be taking too long to finish. More info at
b/277145074

We need to backport this to the `v1.54.x` branch if this is the right
fix.
wanlin31 pushed a commit that referenced this pull request May 18, 2023
This PR aims to de-experimentalize the APIs for GCP Observability. 

We would have ideally wanted public feedback before declaring the APIs
stable, but we need stable APIs for GA.

Changes made after API review with @markdroth @veblush, @ctiller and the
entire Core/C++ team -
* The old experimental APIs `grpc::experimental::GcpObservabilityInit`
and `grpc::experimental::GcpObservabilityClose` are now deprecated and
will be deleted after v.1.55 release.
* The new API gets rid of the Close method and follows the RAII idiom
with a single `grpc::GcpObservability::Init()` call that returns an
`GcpObservability` object, the lifetime of which controls when
observability data is flushed.
* The `GcpObservability` class could in the future add more methods. For
example, a debug method that shows the current configuration.
* Document that GcpObservability initialization and flushing (on
`GcpObservability` destruction) are blocking calls.
* Document that gRPC is still usable if GcpObservability initialization
failed. (Added a test to prove the same).
* Since we don't have a good way to flush stats and tracing with
OpenCensus, the examples required users to sleep for 25 seconds. This
sleep is now part of `GcpObservability` destruction.

Additional Implementation details -
* `GcpObservability::Init` is now marked with `GRPC_MUST_USE_RESULT` to
make sure that the results are used. We ideally want users to store it,
but this is better than nothing.
* Added a note on GCP Observability lifetime guarantees.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
wanlin31 pushed a commit that referenced this pull request May 18, 2023
.. as it is now part of the `GcpObservabilityClose()` routine
[itself](https://github.com/grpc/grpc/pull/32715/files#diff-e1ce0ccb4650e20b62a6d6b31655f446ad9ef72efca5849143e65f4a5a5e0310R223).

Background: #32715 may have broken the CI for observability interop
testing. The client seems to be taking too long to finish. More info at
b/277145074

We need to backport this to the `v1.54.x` branch if this is the right
fix.
@yashykt yashykt deleted the GcpObservabilityGraduation branch May 18, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bloat/none imported Specifies if the PR has been imported to the internal repository lang/c++ per-call-memory/neutral per-channel-memory/neutral release notes: yes Indicates if PR needs to be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.