Skip to content

docs: add guides for occ, configure_client, and troubleshooting#5441

Draft
bshaffer wants to merge 7 commits intogoogleapis:mainfrom
bshaffer:add-product-neutral-guides
Draft

docs: add guides for occ, configure_client, and troubleshooting#5441
bshaffer wants to merge 7 commits intogoogleapis:mainfrom
bshaffer:add-product-neutral-guides

Conversation

@bshaffer
Copy link
Copy Markdown

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.73%. Comparing base (7903bbc) to head (7c09af5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5441   +/-   ##
=======================================
  Coverage   97.73%   97.73%           
=======================================
  Files         217      217           
  Lines       48177    48177           
=======================================
  Hits        47087    47087           
  Misses       1090     1090           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coryan
Copy link
Copy Markdown
Contributor

coryan commented Apr 16, 2026

The deny failures are probably because this PR needs to rebase to HEAD. You are hitting vulnerability errors that we already fixed.

The formatting error is more complicated:


Error: Could not format "/workspace/guide/src/occ.md".
--
  |  
  | The formatted Markdown renders to different HTML than the input Markdown. This
  | is likely a bug in mdformat. Please create an issue report here, including the
  | input Markdown: https://github.com/executablebooks/mdformat/issues


Maybe we need to update mdformat ??

Copy link
Copy Markdown
Member

@dbolduc dbolduc left a comment

Choose a reason for hiding this comment

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

I only looked at the proxy section


### Proxy with gRPC

When using the gRPC transport (standard for most services), the client library
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nope, they almost all use REST.

.build()?;

let config = ClientConfig::default()
.with_http_client(http_client);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not an API.

Which is why we compile our sample code.

Copy link
Copy Markdown
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

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

Just some drive-by comments.

Comment thread guide/src/occ.md Outdated
Comment on lines +39 to +40
If you are using a client that wraps the gRPC C-core, environment variables like
`GRPC_TRACE` and `GRPC_VERBOSITY` may also be relevant.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is never a wrapped C-core for gRPC in Rust.

Suggested change
If you are using a client that wraps the gRPC C-core, environment variables like
`GRPC_TRACE` and `GRPC_VERBOSITY` may also be relevant.

Comment on lines +48 to +51
```bash
# Point gRPC to a CA bundle that includes your proxy's certificate
export GRPC_DEFAULT_SSL_ROOTS_FILE_PATH="/path/to/roots.pem"
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nothing in Rust uses that environment variable.

Comment on lines +40 to +41
export http_proxy="http://proxy.example.com:3128"
export https_proxy="http://proxy.example.com:3128"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I assume this is true, but frankly I have not tested this feature.

Comment on lines +59 to +75
```rust
use google_cloud_secret_manager::v1::client::{SecretManagerClient, ClientConfig};

async fn run() -> Result<(), Box<dyn std::error::Error>> {
// Configure a proxy using standard environment variables or a custom connector
let proxy = reqwest::Proxy::all("http://user:password@proxy.example.com")?;
let http_client = reqwest::Client::builder()
.proxy(proxy)
.build()?;

let config = ClientConfig::default()
.with_http_client(http_client);

let client = SecretManagerClient::new(config).await?;
Ok(())
}
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move this to a code sample so we can compile it, it won't compile

Comment on lines +81 to +95
## 5. Logging

You can use the `tracing` crate to capture client logs. By initializing a
subscriber, you can debug request metadata, status codes, and events.

```rust
use tracing_subscriber;

fn main() {
// Initialize tracing subscriber to see debug output from the client
tracing_subscriber::fmt()
.with_max_level(tracing::Level::DEBUG)
.init();
}
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can just reference this doc instead:

https://docs.cloud.google.com/rust/enable-logging

Comment on lines +97 to +107
## 6. Other common configuration options

The following options can be passed to the configuration builder of most
clients.

| Option | Type | Description |
| ----- | ----- | ----- |
| `credentials` | `Option<Credentials>` | Explicit credentials object for authentication. |
| `endpoint` | `String` | The address of the API remote host. Used for Regional Endpoints (e.g., `https://us-central1-pubsub.googleapis.com:443`) or Private Service Connect. |

To use API Keys [override the default credentials with API keys][override-api-keys].
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread ci/requirements.txt
bshaffer and others added 2 commits April 17, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants