public string TraceGoogleCloudProjectId { get; set; }
The ID of the Google Cloud Project where trace data is being written to Google Cloud Trace.
Optional. Set this property to enable Google Cloud Trace and Logging correlation.
This property has no effect on where log entries are written to.
It also has no effect on whether trace information is actually exported to Google Cloud Trace or to which Google Cloud Project traces are exported to.
When set, this property informs the Console Logger to include trace context information (if any) on the log entries, assuming the trace information is being stored on the specified Google Cloud Project.
Note that when running your code in Google Cloud, for instance in Google Cloud Run, trace information is automatically collected and exported by the runtime.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["The latest version of the Google.Cloud.Logging.Console package is 1.4.0, and the documentation provided covers versions from 1.0.0 through 1.4.0."],["The `GoogleCloudConsoleFormatterOptions` class, which inherits from `ConsoleFormatterOptions`, provides configuration options for `GoogleCloudConsoleFormatter`."],["`GoogleCloudConsoleFormatterOptions` allows users to set the `TraceGoogleCloudProjectId`, which is used to enable correlation between Google Cloud Trace and Logging by including trace context information in log entries."],["The `TraceGoogleCloudProjectId` property does not control where logs or traces are written, but it does control whether trace information is added to the logs, which will happen automatically when running on Google Cloud."],["Inherited properties from `ConsoleFormatterOptions` include `IncludeScopes`, `TimestampFormat`, and `UseUtcTimestamp`, which allow to configure logging scopes and timestamp formatting."]]],[]]