diff --git a/managed/services/agents/service_info_broker.go b/managed/services/agents/service_info_broker.go index e62fd68853..e3b87cd0b0 100644 --- a/managed/services/agents/service_info_broker.go +++ b/managed/services/agents/service_info_broker.go @@ -133,6 +133,11 @@ func (c *ServiceInfoBroker) GetInfoFromService(ctx context.Context, q *reform.Qu } }() + // External exporters and haproxy do not support this functionality. + if service.ServiceType == models.ExternalServiceType || service.ServiceType == models.HAProxyServiceType { + return nil + } + pmmAgentID := pointer.GetString(agent.PMMAgentID) isSibSupported, err := isServiceInfoBrokerSupported(q, pmmAgentID) if err != nil { @@ -143,11 +148,6 @@ func (c *ServiceInfoBroker) GetInfoFromService(ctx context.Context, q *reform.Qu return nil } - // External exporters and haproxy do not support this functionality. - if service.ServiceType == models.ExternalServiceType || service.ServiceType == models.HAProxyServiceType { - return nil - } - pmmAgent, err := c.r.get(pmmAgentID) if err != nil { return err