diff --git a/pkg/entities/entities_api.go b/pkg/entities/entities_api.go index 122c3bd7..ede75763 100644 --- a/pkg/entities/entities_api.go +++ b/pkg/entities/entities_api.go @@ -2079,26 +2079,46 @@ const getEntitySearchByQuery = `query( permalink reporting type + tags { + key + values + } ... on ApmApplicationEntityOutline { __typename applicationId language + tags { + key + values + } } ... on ApmDatabaseInstanceEntityOutline { __typename host portOrPath vendor + tags { + key + values + } } ... on ApmExternalServiceEntityOutline { __typename host + tags { + key + values + } } ... on BrowserApplicationEntityOutline { __typename agentInstallType applicationId servingApmApplicationId + tags { + key + values + } } ... on DashboardEntityOutline { __typename @@ -2106,9 +2126,17 @@ const getEntitySearchByQuery = `query( dashboardParentGuid permissions updatedAt + tags { + key + values + } } ... on ExternalEntityOutline { __typename + tags { + key + values + } } ... on GenericEntityOutline { __typename @@ -2120,24 +2148,44 @@ const getEntitySearchByQuery = `query( ... on GenericInfrastructureEntityOutline { __typename integrationTypeCode + tags { + key + values + } } ... on InfrastructureAwsLambdaFunctionEntityOutline { __typename integrationTypeCode runtime + tags { + key + values + } } ... on InfrastructureHostEntityOutline { __typename + tags { + key + values + } } ... on MobileApplicationEntityOutline { __typename applicationId + tags { + key + values + } } ... on SecureCredentialEntityOutline { __typename description secureCredentialId updatedAt + tags { + key + values + } } ... on SyntheticMonitorEntityOutline { __typename @@ -2145,17 +2193,33 @@ const getEntitySearchByQuery = `query( monitorType monitoredUrl period + tags { + key + values + } } ... on ThirdPartyServiceEntityOutline { __typename + tags { + key + values + } } ... on UnavailableEntityOutline { __typename + tags { + key + values + } } ... on WorkloadEntityOutline { __typename createdAt updatedAt + tags { + key + values + } } } nextCursor diff --git a/pkg/entities/entity_integration_test.go b/pkg/entities/entity_integration_test.go index 3ad57c76..cc3d3093 100644 --- a/pkg/entities/entity_integration_test.go +++ b/pkg/entities/entity_integration_test.go @@ -63,6 +63,7 @@ func TestIntegrationSearchEntitiesByQuery(t *testing.T) { require.NoError(t, err) require.Greater(t, len(actual.Results.Entities), 0) + require.Greater(t, len(actual.Results.Entities[0].GetTags()), 0) } func TestIntegrationSearchEntities_domain(t *testing.T) { diff --git a/pkg/entities/types.go b/pkg/entities/types.go index c0a0f198..0c30c1e4 100644 --- a/pkg/entities/types.go +++ b/pkg/entities/types.go @@ -5254,6 +5254,11 @@ type ApmApplicationEntityOutline struct { UiTemplates []EntityDashboardTemplatesUi `json:"uiTemplates"` } +// GetTags returns a pointer to the value of Tags from ApmApplicationEntityOutline +func (x ApmApplicationEntityOutline) GetTags() []EntityTag { + return x.Tags +} + // GetAccount returns a pointer to the value of Account from ApmApplicationEntityOutline func (x ApmApplicationEntityOutline) GetAccount() accounts.AccountOutline { return x.Account @@ -5384,11 +5389,6 @@ func (x ApmApplicationEntityOutline) GetSummaryMetrics() []EntitySummaryMetric { return x.SummaryMetrics } -// GetTags returns a pointer to the value of Tags from ApmApplicationEntityOutline -func (x ApmApplicationEntityOutline) GetTags() []EntityTag { - return x.Tags -} - // GetType returns a pointer to the value of Type from ApmApplicationEntityOutline func (x ApmApplicationEntityOutline) GetType() string { return x.Type @@ -5819,6 +5819,11 @@ type ApmDatabaseInstanceEntityOutline struct { Vendor string `json:"vendor,omitempty"` } +// GetTags returns a pointer to the value of Tags from ApmDatabaseInstanceEntityOutline +func (x ApmDatabaseInstanceEntityOutline) GetTags() []EntityTag { + return x.Tags +} + // GetAccount returns a pointer to the value of Account from ApmDatabaseInstanceEntityOutline func (x ApmDatabaseInstanceEntityOutline) GetAccount() accounts.AccountOutline { return x.Account @@ -5929,11 +5934,6 @@ func (x ApmDatabaseInstanceEntityOutline) GetSummaryMetrics() []EntitySummaryMet return x.SummaryMetrics } -// GetTags returns a pointer to the value of Tags from ApmDatabaseInstanceEntityOutline -func (x ApmDatabaseInstanceEntityOutline) GetTags() []EntityTag { - return x.Tags -} - // GetType returns a pointer to the value of Type from ApmDatabaseInstanceEntityOutline func (x ApmDatabaseInstanceEntityOutline) GetType() string { return x.Type @@ -9715,6 +9715,11 @@ type ExternalEntityOutline struct { UiTemplates []EntityDashboardTemplatesUi `json:"uiTemplates"` } +// GetTags returns a pointer to the value of Tags from ExternalEntityOutline +func (x ExternalEntityOutline) GetTags() []EntityTag { + return x.Tags +} + // GetAccount returns a pointer to the value of Account from ExternalEntityOutline func (x ExternalEntityOutline) GetAccount() accounts.AccountOutline { return x.Account @@ -9815,11 +9820,6 @@ func (x ExternalEntityOutline) GetSummaryMetrics() []EntitySummaryMetric { return x.SummaryMetrics } -// GetTags returns a pointer to the value of Tags from ExternalEntityOutline -func (x ExternalEntityOutline) GetTags() []EntityTag { - return x.Tags -} - // GetType returns a pointer to the value of Type from ExternalEntityOutline func (x ExternalEntityOutline) GetType() string { return x.Type @@ -10146,6 +10146,11 @@ type GenericEntityOutline struct { UiTemplates []EntityDashboardTemplatesUi `json:"uiTemplates"` } +// GetTags returns a pointer to the value of Tags from GenericEntityOutline +func (x GenericEntityOutline) GetTags() []EntityTag { + return x.Tags +} + // GetAccount returns a pointer to the value of Account from GenericEntityOutline func (x GenericEntityOutline) GetAccount() accounts.AccountOutline { return x.Account @@ -10246,11 +10251,6 @@ func (x GenericEntityOutline) GetSummaryMetrics() []EntitySummaryMetric { return x.SummaryMetrics } -// GetTags returns a pointer to the value of Tags from GenericEntityOutline -func (x GenericEntityOutline) GetTags() []EntityTag { - return x.Tags -} - // GetType returns a pointer to the value of Type from GenericEntityOutline func (x GenericEntityOutline) GetType() string { return x.Type @@ -17345,6 +17345,7 @@ type EntityOutlineInterface interface { GetGUID() common.EntityGUID GetName() string GetType() string + GetTags() []EntityTag } // UnmarshalEntityOutlineInterface unmarshals the interface into the correct type diff --git a/tools/go.mod b/tools/go.mod index 660d76aa..797752f3 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -410,7 +410,6 @@ require ( github.com/xanzy/go-gitlab v0.105.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xen0n/gosmopolitan v1.2.1 // indirect - github.com/xhit/go-str2duration/v2 v2.1.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.2.0 // indirect