Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

Commit 649245c

Browse files
Loosen regex for agent attribute (#55)
1 parent 29edcb5 commit 649245c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/validation/mock_trace_validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var (
5454
}
5555
requiredFields = []string{"Name", "SpanId", "DisplayName", "StartTime", "EndTime"}
5656
spanNameRegex = regexp.MustCompile("^projects/[^/]+/traces/[a-fA-F0-9]{32}/spans/[a-fA-F0-9]{16}$")
57-
agentRegex = regexp.MustCompile(`^opentelemetry-[a-zA-Z]+ [0-9]+\.[0-9]+\.[0-9]+; google-cloud-trace-exporter [0-9]+\.[0-9]+\.[0-9]+$`)
57+
agentRegex = regexp.MustCompile(`^opentelemetry-[a-zA-Z]+ \d+(?:\.\d+)+; google-cloud-trace-exporter \d+(?:\.\d+)+$`)
5858
)
5959

6060
// SpanData wraps all the span data on the server into a struct.

0 commit comments

Comments
 (0)