in recipes/beyla-service-graph/graphgen/main.go [77:90]
func createPromApiClient(ctx context.Context) (api.Client, error) {
roundTripper, err := apihttp.NewTransport(
ctx,
http.DefaultTransport,
option.WithScopes("https://www.googleapis.com/auth/monitoring.read"),
)
if err != nil {
return nil, err
}
return api.NewClient(api.Config{
Address: fmt.Sprintf("https://monitoring.googleapis.com/v1/projects/%v/location/global/prometheus", *projectId),
RoundTripper: roundTripper,
})
}