-
Notifications
You must be signed in to change notification settings - Fork 31
app log entries do not have request-Id metadata to associate with a request log entry #76
Comments
Are you referring to the logs one can see on the developers console? A code snippet or screenshot would be helpful. |
I'm referring to the logs i see in Google Cloud Logs. I converted an app from the standard runtime to flexible vm. Before the conversion, my app logs would show up grouped with the request log. After the conversion they are in a separate app log, which is fine, but there is no request-id in the metadata that I can use to correlate to any request log entries. |
In the Cloud Logging UI, can you click on the vertical ". . ." on the right-hand side and see if there's a "see logs from same request" or similar functionality exposed? This functionality is based on the "cloud trace ID" (in the metadata of the log) and will be the focus of our log correlation efforts going forward. |
@andrewsg - I tried a bunch of things - and still no solution. If I click "Show entries from same request" on the request log - this gets put in the filter: If I click "Show entries from same request" on the app log - this gets put in the filter: I see a Hope this helps... |
hey just following up, are you guys able to confirm this is indeed a bug? Or is there something wrong with the way I'm doing things. |
Not sure quite yet. |
To clarify here:
The primary reason for this difference that because there's so much variance in how things can be set up, so there currently isn't a simple way to do log to request correlation. We are investigating this, but we have not yet committed to feature parity. There are a few workarounds. You can always log in JSON format and log the request ID and use bigquery to analyze by request. I am closing this issue for the time being. |
@jonparrott how does one log the request ID that gets logged in request_log from within application-level logs? Currently, I'm creating my own request ID for each request that comes in and just logging that, but that doesn't help with correlating my stdout/stderr logs with request_log entries. |
@kavriskive I'm not sure. Perhaps @andrewsg knows (iirc, he's working on some of this). |
@kavriskive I'm doing this by grabbing the header value from |
Currently this isn't done automatically because we're in the process of unifying on Cloud Trace IDs as the canonical ID for a request. UI work is ongoing to make this appear seamless; for now there's an awkward adolescence. |
Hello, |
We know that users want this feature, and we are working on improving the logging experience across all of our compute platforms. We can't presently speak to any specific plans or dates. |
Any update on how this can be accomplished even as a workaround? Even if it's not possible to group logs visually like with AES, there should at least be a way to view all logs for a specific request on AEF right? |
The Google Cloud Client library for logging (https://googlecloudplatform.github.io/google-cloud-python/latest/logging/usage.html) properly labels logs for per-request aggregation. You can use that library on App Engine Flex, GKE, GCE, GCF, and non-Google platforms. Unfortunately, it is not supported on App Engine Standard yet (googleapis/google-cloud-python#1893 (comment)). Please note that if you are using one of the "python-compat" runtimes ("runtime: python27" for Managed VMs, "runtime: python-compat" for App Engine Flex), they have been frozen except for security updates. |
wild guess, but could it be because the actual request header is
X-Appengine-Request-Log-Id
and the code looks like it's looking forX-Appengine-Request-Id
?The text was updated successfully, but these errors were encountered: