google-ads-api
google-ads-api copied to clipboard
Accessing raw request/response data for Google support debugging
Hi all,
Trying to debug an issue with Google support and they are requesting the raw request/response logs, not just the request_id
.
In earlier versions of the library we used to be able to specify LogOptions
which would be passed through to google-ads-node
and would let you control verbosity, etc.
In the latest library version, the hooks don't provide as much detail, at least not at the level Google support requires to assist. Are there any alternatives I'm not aware of? If not consider this a feature request to add the LogOptions
back :D
Hi @rosslavery, this is an interesting idea! I will see if we can get it into a future version.
Hi, I second this, it would be very helpful!
With partial_failure
set to true
, I'm not even getting back the request_id
. Setting it to false is not an option unfortunately. Any workaround you could think of to allow me to get the request_id
back? Thanks!
Couple of notes:
- Google support has become particularly insistent on these details being provided before they can offer any help via their official support channels
- A workaround I've found for this is to replicate the problematic request via the REST API and that tends to get them to be more open to providing support since it's an officially supported method
- A workaround I've found for this is to replicate the problematic request via the REST API and that tends to get them to be more open to providing support since it's an officially supported method
Great suggestion, I'm going to try this workaround! Thank you @rosslavery
Any update on this topic @wcoots ? I am also in need of the same information.
hi @wcoots, I wrote a Google Ads API library for node, and I supported Logging, you can refer to my source code for your project. https://github.com/htdangkhoa/google-ads/blob/main/src/lib/LoggingInterceptor.ts
After you have defined your Logging Interceptor, you can add it by this way in your service.ts
file:
...
// Initialising services can take a few ms, so we cache when possible.
const creds = this.getCredentials();
const client = new protoService({
sslCreds: creds,
grpc: new grpc.Client(protoService.apiEndpoint, creds, {
interceptors: [
// add logging interceptor to grpc client
],
}),
});
...
Good luck 😃