Skip to content

Commit

Permalink
Update metricbeat/module/kubernetes/util/kubernetes.go
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Katsoulis <[email protected]>
  • Loading branch information
constanca-m and MichaelKatsoulis authored Feb 8, 2024
1 parent f2d65a4 commit 1d1a142
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions metricbeat/module/kubernetes/util/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,12 @@ func createMetadataGenSpecific(client k8sclient.Interface, commonConfig *conf.C,
return metaGen, fmt.Errorf("failed to create a metadata generator for resource %s", resourceName)
}

// NewResourceMetadataEnricher returns a metadata enricher for a given resource
// For the metadata enrichment, resource watchers are used which are shared between
// the different metricsets. For example for pod metricset, a pod watcher, a namespace and
// node watcher are by default needed in addition to job and replicaset watcher according
// to configuration. These watchers will be also used by other metricsets that require them
// like state_pod, state_container, node etc.
func NewResourceMetadataEnricher(
base mb.BaseMetricSet,
metricsRepo *MetricsRepo,
Expand Down

0 comments on commit 1d1a142

Please sign in to comment.