func getHTTPMethod()

in pkg/plugin/cloudtrace/cloudtrace.go [135:145]


func getHTTPMethod(span *tracepb.TraceSpan) string {
	labels := span.GetLabels()

	// In both cases treating "not existing" and "empty value" the same
	httpMethod := labels[otelMethodKey]
	if httpMethod == "" {
		httpMethod = labels[cloudTraceMethodKey]
	}

	return httpMethod
}