Skip to content

Commit

Permalink
[CONTP-500] Including the internal prefix in tagger for filtering (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
gabedos authored Nov 8, 2024
1 parent 9b6d767 commit be5f444
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion comp/core/tagger/common/entity_id_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions comp/core/tagger/types/entity_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -75,5 +77,6 @@ func AllPrefixesSet() map[EntityIDPrefix]struct{} {
KubernetesMetadata: {},
KubernetesPodUID: {},
Process: {},
InternalID: {},
}
}
1 change: 1 addition & 0 deletions comp/core/tagger/types/filter_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func TestFilterBuilderOps(t *testing.T) {
KubernetesMetadata: {},
KubernetesPodUID: {},
Process: {},
InternalID: {},
},
cardinality: HighCardinality,
},
Expand Down

0 comments on commit be5f444

Please sign in to comment.