beyla icon indicating copy to clipboard operation
beyla copied to clipboard

How to turn off target_info metrics

Open hhy5861 opened this issue 4 months ago • 4 comments

Image

There are a lot of target_info metrics tags, but these metrics are of no use to me. How can I turn them off to reduce resource usage and collection pressure?

hhy5861 avatar Aug 21 '25 09:08 hhy5861

are you using otel metrics? can you share your config?

marctc avatar Aug 21 '25 11:08 marctc

are you using otel metrics? can you share your config?

This is my deployment config:

open_port: "80" http_normalize_path: true

prometheus_export: port: 9400 path: "/metrics"

otelcol: exporter: prometheus: include_target_info: false

attributes: instance_id: dns: false select: db_client_operation_duration: include: [""] exclude: ["instance", "service_namespace"] http_server_request_body_size: include: [""] exclude: ["client_address", "instance", "server_address", "server_port", "service_namespace", "url_path"] http_server_request_duration: include: [""] exclude: ["client_address", "instance", "server_address", "server_port", "service_namespace", "url_path"] http_server_response_body_size: include: [""] exclude: ["client_address", "instance", "server_address", "server_port", "service_namespace", "url_path"]

My monitoring scenario is apache+perl, and I also found that the monitoring data of QPS and AWS target group are highly correlated.

target group: Image

metrics QPS:

Image

I haven't figured out where the problem is.

hhy5861 avatar Aug 24 '25 11:08 hhy5861

Do you mind provide a formated config and bit of your setup? Refer to issue template for all the information that we usually need for debugging. Also some of the options don't exist (include_target_info). I think beyla is not setting up that instance, so it's rather the collector/prometheus.

marctc avatar Aug 27 '25 12:08 marctc

Do you mind provide a formated config and bit of your setup? Refer to issue template for all the information that we usually need for debugging. Also some of the options don't exist (include_target_info). I think beyla is not setting up that instance, so it's rather the collector/prometheus.

  1. Currently, I cannot disable reporting of (target_info) metrics using otel.
  2. I also cannot exclude the (instance) tag within each metric.

version: level=INFO msg="Grafana Beyla" Version=v2.5.8 Revision=cec5b98 "OpenTelemetry SDK Version"=1.36.0

discovery:
  instrument:
    - open_ports: 80

otel_metrics_export:
  endpoint: http://127.0.0.1:4318

otel_traces_export:
  endpoint: http://127.0.0.1:4317
  sampler:
    name: parentbased_traceidratio
    arg: "0.7" 

attributes:
  select:
    db_client_operation_duration:
      include: ["*"]
      exclude: ["instance", "service_namespace"]
    http_server_request_body_size:
      exclude: ["client_address", "instance", "server_port", "service_name"]
    http_server_request_duration:
      exclude: ["client_address", "instance", "server_port", "service_name"]
    http_server_response_body_size:
      exclude: ["client_address", "instance", "server_port", "service_name"]

I hope to be able to turn off the reporting of target_info metrics. Or remove the (instance) tag of the indicator.

hhy5861 avatar Aug 27 '25 12:08 hhy5861