[GCP] Metricset metrics client allow overriding the endpoint #40848
Labels
Team:obs-ds-hosted-services
Label for the Observability Hosted Services team
Team:Obs-InfraObs
Label for the Observability Infrastructure Monitoring team
The GCP metricset metric as I was looking at
beats/x-pack/metricbeat/module/gcp/metrics/metricset.go
Line 143 in 38ba816
We are not able to override the api endpoint. It would be good to be able to do that if we want to test against a fake GCP API endpoint.
Looking at the source code of the client https://github.com/googleapis/google-cloud-go/blob/4265accaab624984d7ea60025e24198a0a0db6d3/monitoring/apiv3/metric_client.go#L55 it looks it gives us the ability to define the option
option.WithEndpoint(...)
Preferably, it would be good to override with some env var.
This will be useful in the effort we are starting with doing performance work for metricbeat.
Not sure which team is more suited for this ask; I am just pinging both teams from the codeowners
@elastic/obs-ds-hosted-services or @elastic/obs-infraobs-integrations
Sorry for the noise. If you feel you are in the wrong group or the file is not up-to-date.
/cc @cachedout @ablnk
The text was updated successfully, but these errors were encountered: