From the documentation:
To associate a log entry with a trace by setting the trace field in the LogEntry object. The trace field must be set to a string with the following format:
projects/PROJECT_ID/traces/TRACE_ID where PROJECT_ID is your Google
Cloud project ID and TRACE_ID is the trace identifier
To associate a log entry with a span when using the Cloud Logging API, set the spanId field in the LogEntry object to the 16-character hexadecimal encoding of the span's ID. For example, to associate a log entry with a span that has an ID of 74, set the span ID to
000000000000004a
.
However, this assumes that I am using @google-cloud/trace-agent
, which I am not – I am using open-telemetry.
Is there a way to associate logs with Open Telemetry by assigning them meta data that Google would recognize or must I submit all the logs directly to OpenTelemetry collector?