Unable to Filter Metrics Using Resource Attributes - resource_attributes #8106
-
Hi Everyone,
This works fine and I see filtered metrics against my apps in the Container Insights. The problem is as soon as I add
AWS ADOT Collector stops publishing any metrics to Container Insights. Can anyone please help with this? I am using this guide and sample config file: Sample config file: Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Beta Was this translation helpful? Give feedback.
-
@mskhan-devops I was not able to reproduce the problem with neither the current upstream of receivers:
prometheus:
config:
scrape_configs:
- job_name: 'otel-collector'
scrape_interval: 5s
static_configs:
- targets: ['0.0.0.0:8888']
processors:
filter/1:
metrics:
include:
match_type: regexp
metric_names:
- otelcol_process.*
resource_attributes:
- Key: job
Value: otel.*
exporters:
logging/debug:
loglevel: debug
service:
pipelines:
metrics:
receivers: [prometheus]
processors: [filter/1]
exporters: [logging/debug] This self-scrapes the OpenTelemetry Collector and puts output on the console. The filter seems to be working as intended. When |
Beta Was this translation helpful? Give feedback.
@mskhan-devops I was not able to reproduce the problem with neither the current upstream of
opentelemetry-collector-contrib
nor v0.16 ofadot
. I might have missed something, but my understanding of the problem description is that "when both metric_names and resource_attributes are specified, no metrics are emitted". Is that correct? I tried following config: