Skip to content
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

Consider adding a simple trace correlation mechanism to Google.Cloud.Logging.Console. #9948

Closed
amanda-tarafa opened this issue Feb 23, 2023 · 8 comments · Fixed by #10190
Closed
Assignees
Labels
api: cloudtrace Issues related to the Cloud Trace API. api: logging Issues related to the Cloud Logging API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@amanda-tarafa
Copy link
Contributor

This would allow applications already in posession of a collected trace context to specify it on log entries so they are correlated.

Out of scope: any mechanism to create, augment, or collect trace contexts.

To provide an alternative for #9868 use case.

@amanda-tarafa amanda-tarafa added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: logging Issues related to the Cloud Logging API. api: cloudtrace Issues related to the Cloud Trace API. labels Feb 23, 2023
@amanda-tarafa amanda-tarafa self-assigned this Feb 23, 2023
@christopheblin
Copy link

christopheblin commented Mar 13, 2023

Hi @amanda-tarafa

any progress on this ?

I make no progress on #9868 (still missing traces with SizedBuffer and even with NoBuffer) so maybe this soluiton could get me out of troubles (i.e avoid grpc calls for logs/traces that are slowing done http requests)

@amanda-tarafa
Copy link
Contributor Author

I'm out sick, but I'll try and see what I can do as soon after I'm back. Mid to late week most likely. Sorry for the wait, we'll get there.

@amanda-tarafa
Copy link
Contributor Author

Just a note: we are considering the options here, I'll update when I know more.

@amanda-tarafa
Copy link
Contributor Author

Quick update, we are working on this. We have a tentive proposal that if approved, we should start implementing in the next few days.

@Rishabh-V
Copy link
Contributor

We can close this once the documentation is updated with the desired level of information.

@jskeet
Copy link
Collaborator

jskeet commented May 4, 2023

Closing - the code has been released, and the docs will be published at https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Console/latest in due course. (It takes a while for them to be processed.)

@christopheblin
Copy link

Hi @jskeet and @amanda-tarafa

Sorry for the delay, we had another project in front of this one...

I've followed the documentation, it is working : I can see logs in Logs explorer and I can click on the left arrow to see all logs of the same trace

image

However, the view trace details is not working

image

Here is an example project (be aware to replace values in cloudbuild.yaml / cloudrun.yaml)

gcp-log-trace.zip

Given the doc https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.Console/latest#log-trace-correlation, I'd expect traces to work

  1. application exports log entries to Google Cloud Logging => yes because of cloud run
  2. application exports traces to Google Cloud Trace.=> yes because of cloud run default
  3. having trace context => yes becasuse of ASP.NET core
  4. The console formatter configured with the Google Cloud Project ID => yes because of the line `builder.Logging.AddGoogleCloudConsole(options => options.TraceGoogleCloudProjectId = gcpProject);

IMHO, the point 2 is the issue : the doc says "by default Cloud run exports traces" but this is not the case I think

=> how can we diagnose this point ? should i open a new issue ?

@amanda-tarafa
Copy link
Contributor Author

Yes please, can you create a new issue with the repro? I'll take a look as soon as I'm able.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudtrace Issues related to the Cloud Trace API. api: logging Issues related to the Cloud Logging API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants