Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set X-Cloud-Trace-Context header on prober requests to help log corre… #977

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/prober/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (

"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/google/uuid"
"github.com/prometheus/client_golang/prometheus"

retryablehttp "github.com/hashicorp/go-retryablehttp"
Expand Down Expand Up @@ -63,6 +64,8 @@ func setHeaders(req *retryablehttp.Request, token string) {
// Set the content-type to reflect we're sending JSON.
req.Header.Set("Content-Type", "application/json")
req.Header.Set("User-Agent", fmt.Sprintf("Sigstore_Scaffolding_Prober/%s", versionInfo.GitVersion))
// Set this value (even though it is not coming through an GCP LB) to correlate prober req/response
req.Header.Set("X-Cloud-Trace-Context", uuid.Must(uuid.NewV7()).String())
}

// fulcioWriteEndpoint tests the only write endpoint for Fulcio
Expand Down
Loading