mirror of https://github.com/knative/pkg.git
				
				
				
			Support short suffix in zipkin config (#1840)
This commit is contained in:
		
							parent
							
								
									a2394e8895
								
							
						
					
					
						commit
						a37d20384b
					
				|  | @ -241,7 +241,7 @@ func jsonTrace(traceID string) ([]model.SpanModel, error) { | |||
| 
 | ||||
| func parseNamespaceFromHostname(hostname string) (string, error) { | ||||
| 	parts := strings.Split(hostname, ".") | ||||
| 	if len(parts) < 3 || parts[2] != "svc" { | ||||
| 	if len(parts) < 3 || !(parts[2] == "svc" || strings.HasPrefix(parts[2], "svc:")) { | ||||
| 		return "", fmt.Errorf("could not extract namespace/name from %s", hostname) | ||||
| 	} | ||||
| 	return parts[1], nil | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue