Google cloud platform view request logs? - google-cloud-platform

I am new to Google Cloud platform, I am trying out Google's Talent Solution APIs and getting 400 and 409 errors. I would like to know how to see the error trace on my google cloud platform console for those requests? I could see those requests in the dashboard, not sure if I can drill down and see the exact error?

If you see these errors in your Developer Console main dashboard in the "Error Reporting" section, you should be able to click on the "Go to Error Reporting" link. There, you'll see a list of errors that happened lately. Clicking on one of them, you'll see more info on that specific error (occurrences, last seen, etc...) and a stack trace sample. Further down, you'll see a list of the last occurrences for that error and their respective link to the logs.
Alternatively, you may go directly to your Dev Console -> Logging section and choose the Talent Solution resource if available or the resource where you call the API from (App Engine, GKE, etc...) and filter the logs by error code to get details about these.

Related

What's behind GCP `There was an error while loading xxx. Please try again.` UI error?

When accessing Google Cloud Platform Services, I'm requested to retry due to an unknown error. It affects all services I want to access.
The snapshot below showcases the issue with Google Cloud Build.
Here's the same error with Google Cloud Storage.
This has first occurred month ago but been automagically resolved without any further action from my side. This second appearance has now lasted 4 days.
Looking at Google Cloud Status, I can't link any incident to this behaviour.
Options I've been exploring with no success are:
Logging back in
Checking credential access
Important notes:
I have access to the global project dashboard: https://console.cloud.google.com/home/dashboard?project=<project-name>
Other teammates do not face this. I'm now left with a few further actions since I access have been verified.
I tried disabling all the browser extensions. Before narrowing it down to find that the Apollo Client DevTools extension was the culprit.
I had the same error resolved disabling "Keepa - Amazon Price Tracker" extension.

Google Cloud Platform - Stackdriver Trace List all empty

I have a Google App Engine application that is listed under the Stackdriver Trace, but when I go to trace list there is nothing.
However, the logs and error reporting works.
Is there a special setting you need to set in order to get the traces? I've looked through many tutorials and it seems that the traces automatically appear?
Stackdriver Trace is not automatically setup for Compute Engine, App Engine Flexible or Containers. Stackdriver Trace is automatically enabled for App Engine Standard.
You must instrument your application first, then you can review the Stackdriver Trace logs.
Start with this link. Instrumentation is language specific:
Setting Up Stackdriver Trace

How to get Error logs to appear in Stack Driver Error Reporting?

I am having difficulties integrating with Stackdriver Error Reporting.
When using the stack driver log viewer I can see that it has correctly identified it as an error event due to the orange '!!' on the log line.
The logs are coming from a Java Application in a pod on Kubernetes. I am using SLF4J and logback to control my logging. I realise this is not the example in the docs which suggest fluentd however I would like to avoid changing my logging across all applications.
Following the troubleshooting guide I am able to submit a log line that is picked up and also directly report an error. This makes me think the issue must be permissions related. I have tried adding the "Error Reporting Admin" role onto the compute engine default service account and onto Kubernetes Engine Service Agent but this has not worked.
Am I missing something?
The !! in the logs viewer means that the LogEntry.severity field has a value of ERROR (which is provided by the client that wrote the entry). Entries that land in Error Reporting need to meet a few other criteria: https://cloud.google.com/error-reporting/docs/formatting-error-messages
You might also be interested in the details on how errors are grouped together: https://cloud.google.com/error-reporting/docs/grouping-errors
The "Error Reporting Admin" role would allow someone (or a service account) to perform actions like muting an error group. There are no permissions requirements to get data from logging into Error Reporting.

Logging level of Google Cloud Profiler Java agent

How to change the log level of Java profiler? I am running the profiler outside GCP.
Although, Profiler is working fine. It is repeatedly logging following errors:
E0803 12:37:37.677731 22 cloud_env.cc:61] Request to the GCE metadata server failed, status code: 404
E0803 12:37:37.677788 22 cloud_env.cc:148] Failed to read the zone name
How can I disable these logs?
For Stackdriver Logging you can use log exclusion filters to create customised filters for logs you want to exclude.
In the Logs Viewer panel, you can enter a filter expression that matches the log entry you want to exclude. This documentation explains about various interfaces to create filters.
You may also want to export the log entries before excluding them, if you do not want to permanently lose the excluded logs.
With respect to this issue in general (i.e. for third party logging), I went ahead and created a feature request on your behalf. Please star it so that you could receive updates about this feature request and do not hesitate to add additional comments to provide details of the desired implementation. You can track the feature request by following this link.

Google Stackdriver Error Reporting blank (not set up)

We are starting to enable Stackdriver for our project, but while I have a ubuntu instance with stackdriver logging, and I am getting the logs shipped back (I can see the logs in Stackdriver Logging), when I browse to Error Reporting, it's just a blank screen with a button to "Setup Error Reporting", which takes me to some API documentation which I think is tailored for new application coding. We are running nginx and the logging is working, but I can't for the life of me figure out how to get the Error Reporting to work properly, if that's even doable.
"Setup Error Reporting" should guide you to the setup documentation (not API documentation). Depending on the platform you are using, you might need to perform some changes in your application's code or log format. Read more at https://cloud.google.com/error-reporting/docs/setup/
If you have Stackdriver Logging setup and on Google Compute Engine, the requirement is for your exception stack traces to be log in single log entries.