Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't to exclude attributes #1128

Open
laa88rf opened this issue Feb 5, 2025 · 1 comment
Open

Can't to exclude attributes #1128

laa88rf opened this issue Feb 5, 2025 · 1 comment

Comments

@laa88rf
Copy link

laa88rf commented Feb 5, 2025

Hello.

I have unneded Kafka metrics. For example:

# HELP kafka_network_RequestMetrics_50thPercentile Attribute exposed for management kafka.network:name=ResponseQueueTimeMs,type=RequestMetrics,attribute=50thPercentile
# TYPE kafka_network_RequestMetrics_50thPercentile untyped
kafka_network_RequestMetrics_50thPercentile{name="LocalTimeMs",request="AddOffsetsToTxn"} 0.0
kafka_network_RequestMetrics_50thPercentile{name="LocalTimeMs",request="AddPartitionsToTxn"} 0.0

I want delete it from /metrics page.
I tried the following:

blacklistObjectNames: ["kafka.log:*", "kafka.network:name=ResponseQueueTimeMs,type=RequestMetrics,attribute=50thPercentile", "kafka.cluster:type=Partition,*"]
rules:
  - pattern: ".*"

also:

excludeObjectNameAttributes:
        "kafka.network:type=RequestMetrics":
                - 50thPercentile

Also:

rules:
- pattern: "(.*)"
  name: "$1"
  action: drop
  labels:
    __name__: ".*(_50thPercentile)$"

and many more options. And none of them work.
Version 1.1.0

Please help me.
Also, please add relevant information about exclude/drop metrics.

Thank you.

@laa88rf
Copy link
Author

laa88rf commented Feb 6, 2025

Ok. I have a progress.

When I using:

autoExcludeObjectNameAttributes: true
includeObjectNameAttributes:
  "kafka.network:type=RequestMetrics":
    - "50thPercentile"

rules:
  - pattern: ".*"

I have only 50thPercentile metric. It's not very obvious.
Of course, I can list the metrics, but it's not convenient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant