Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ProdAddr is the production address. ProdAddr = "logging.googleapis.com:443" // TraceHeader is the HTTP header trace information is stored in. TraceHeader = "X-Cloud-Trace-Context" )
Variables ¶
This section is empty.
Functions ¶
func DeconstructXCloudTraceContext ¶
DeconstructXCloudTraceContext extracts trace information from the trace header.
As per the format described at https://cloud.google.com/trace/docs/setup#force-trace
"X-Cloud-Trace-Context: TRACE_ID/SPAN_ID;o=TRACE_TRUE"
for example:
"X-Cloud-Trace-Context: 105445aa7843bc8bf206b120001000/1;o=1"
We expect:
- traceID (optional): "105445aa7843bc8bf206b120001000"
- spanID (optional): "1"
- traceSampled (optional): true
func FixUTF8 ¶
FixUTF8 is a helper that fixes an invalid UTF-8 string by replacing invalid UTF-8 runes with the Unicode replacement character (U+FFFD). See Issue https://github.com/googleapis/google-cloud-go/issues/1383.
func LogIDFromPath ¶
LogIDFromPath parses and returns the ID from a log path.
func ToProtoStruct ¶
ToProtoStruct converts v, which must marshal into a JSON object, into a Google Struct proto.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.