diff --git a/comp/core/tagger/common/entity_id_builder.go b/comp/core/tagger/common/entity_id_builder.go index f296090b588cd..b9ae1a77bd42b 100644 --- a/comp/core/tagger/common/entity_id_builder.go +++ b/comp/core/tagger/common/entity_id_builder.go @@ -39,7 +39,7 @@ func BuildTaggerEntityID(entityID workloadmeta.EntityID) types.EntityID { } } -var globalEntityID = types.NewEntityID("internal", "global-entity-id") +var globalEntityID = types.NewEntityID(types.InternalID, "global-entity-id") // GetGlobalEntityID returns the entity ID that holds global tags func GetGlobalEntityID() types.EntityID { diff --git a/comp/core/tagger/types/entity_id.go b/comp/core/tagger/types/entity_id.go index 5604d060c9621..94ecb1cb3737a 100644 --- a/comp/core/tagger/types/entity_id.go +++ b/comp/core/tagger/types/entity_id.go @@ -62,6 +62,8 @@ const ( KubernetesPodUID EntityIDPrefix = "kubernetes_pod_uid" // Process is the prefix `process` Process EntityIDPrefix = "process" + // InternalID is the prefix `internal` + InternalID EntityIDPrefix = "internal" ) // AllPrefixesSet returns a set of all possible entity id prefixes that can be used in the tagger @@ -75,5 +77,6 @@ func AllPrefixesSet() map[EntityIDPrefix]struct{} { KubernetesMetadata: {}, KubernetesPodUID: {}, Process: {}, + InternalID: {}, } } diff --git a/comp/core/tagger/types/filter_builder_test.go b/comp/core/tagger/types/filter_builder_test.go index 73d5424103fae..72beadbf33910 100644 --- a/comp/core/tagger/types/filter_builder_test.go +++ b/comp/core/tagger/types/filter_builder_test.go @@ -58,6 +58,7 @@ func TestFilterBuilderOps(t *testing.T) { KubernetesMetadata: {}, KubernetesPodUID: {}, Process: {}, + InternalID: {}, }, cardinality: HighCardinality, },