Add default Prometheus EMF metric_declaration when target allocator is enabled#319
Closed
musa-asad wants to merge 1 commit into
Closed
Conversation
musa-asad
force-pushed
the
fix/prometheus-emf-metric-declarations
branch
from
June 16, 2026 18:38
4c7b32a to
f69ab4e
Compare
Collaborator
Author
|
Closing — this adds an opinionated default metric_declaration rather than fixing a bug. Users are expected to provide their own metric_declaration in configuration-values when enabling Prometheus scraping, as documented in the EKS add-on usage guide. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the Target Allocator is enabled (
agent.prometheus.targetAllocator.enabled=true), the chart renders.spec.prometheuswith onlyscrape_configsand no EMF metric-extraction block. The agent scrapes targets but produces 0 CloudWatch metrics — withoutmetric_declaration, there's no instruction telling the agent which series to export.This change injects a default
emf_processor.metric_declarationblock gated behind the TA toggle. Default behavior for non-TA users is unchanged.Changes
templates/_helpers.tpl— renderprometheus.emf_processor.metric_declarationwhen TA enabled andemfProcessordeclarations are presentvalues.yaml— add defaultagent.prometheus.emfProcessorwithmetricNamespace+metricDeclarationsfor node-exporter and nginxTest Output
helm lint:
Gating proof (EMF block renders only when TA enabled):
CloudWatch metrics before/after:
OTEL CI flag matrix (no regression):
Related