SigNoz/signoz · error · errors SigNozError
ErrCodeInvalidInput
ErrCodeInvalidInput
Error message
invalid deployment: missing name or DNS
What it means
GetSigNozAPIURLFromDeployment builds the SigNoz API URL as https://{name}.{DNS} from a deployment record; it requires both deployment.Name and deployment.Cluster.Region.DNS to be non-empty. Empty values mean the deployment record is incomplete and the URL cannot be constructed.
Source
Thrown at pkg/types/cloudintegrationtypes/account.go:320
ProjectIDs: config.Config.GCP.ProjectIDs,
DeploymentRegion: config.Config.GCP.DeploymentRegion,
},
}, nil
default:
return nil, errors.NewInvalidInputf(ErrCodeCloudProviderInvalidInput, "invalid cloud provider: %s", provider.StringValue())
}
}
func NewAgentReport(data map[string]any) *AgentReport {
return &AgentReport{
TimestampMillis: time.Now().UnixMilli(),
Data: data,
}
}
func GetSigNozAPIURLFromDeployment(deployment *zeustypes.GettableDeployment) (string, error) {
if deployment.Name == "" || deployment.Cluster.Region.DNS == "" {
return "", errors.New(errors.TypeInvalidInput, ErrCodeInvalidInput, "invalid deployment: missing name or DNS")
}
return fmt.Sprintf("https://%s.%s", deployment.Name, deployment.Cluster.Region.DNS), nil
}
func (account *Account) Update(provider CloudProviderType, config *AccountConfig) error {
// deployment region can not be updated once set for Azure
if provider == CloudProviderTypeAzure {
config.Azure.DeploymentRegion = account.Config.Azure.DeploymentRegion
}
account.Config = config
account.UpdatedAt = time.Now()
return nil
}
func (postableAccount *PostableAccount) UnmarshalJSON(data []byte) error {View on GitHub (pinned to 5069bf80b0)
Solutions
- Verify the deployment actually exists before calling — check the fetch returned a populated record
- Ensure the deployment has a Name and its cluster region has a DNS name set
- Fix the upstream fetch to return a proper not-found error instead of an empty struct
- Persist/re-derive missing region DNS in your deployment data
Example fix
// before
dep := &zeustypes.GettableDeployment{} // zero value
url, err := cloudintegrationtypes.GetSigNozAPIURLFromDeployment(dep)
// after
dep, err := fetchDeployment(ctx, id)
if err != nil || dep == nil { return err }
url, err := cloudintegrationtypes.GetSigNozAPIURLFromDeployment(dep)
Defensive patterns
Strategy: try-catch
Validate before calling
if deployment == nil || deployment.Name == "" || deployment.Cluster.Region.DNS == "" { abort with clear error } Try / catch
url, err := cloudintegrationtypes.GetSigNozAPIURLFromDeployment(dep)
if err != nil { logDeploymentFields(dep); return fmt.Errorf("deployment incomplete: %w", err) } Prevention
- Treat empty fetch results as not-found
- Require name+region DNS at deployment creation
When it happens
Trigger: GetConnectionCredentials invoked with a deployment whose Name is empty or whose Cluster.Region.DNS is unset — e.g. a deployment fetched by ID that doesn't exist (zero-value struct) or created without a region.
Common situations: Passing a nil-ish or freshly-allocated GettableDeployment instead of the fetched one; deployments provisioned before region DNS was a required field; lookups returning empty structs instead of not-found errors.
Related errors
- invalid operator: %s
- invalid reduce to operator: %s
- invalid query type: %s
- invalid panel type: %s
- invalid tag type: %s
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/4aac7dccbebbd148.
Report an issue: GitHub.