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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Prometheus StateSet and Info metrics #20621

Open
aliaqel-stripe opened this issue Jun 6, 2024 · 4 comments
Open

Support Prometheus StateSet and Info metrics #20621

aliaqel-stripe opened this issue Jun 6, 2024 · 4 comments
Labels
platform: kubernetes Anything `kubernetes` platform related source: prometheus_pushgateway Anything `prometheus_pushgateway` source related source: prometheus_remote_write Anything `prometheus_remote_write` source related source: prometheus_scrape Anything `prometheus_scrape` source related type: feature A value-adding code addition that introduce new functionality.

Comments

@aliaqel-stripe
Copy link

A note for the community

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Use Cases

We want to scrape metrics from kube-state-metrics for custom resources and a certain kind of metric requires the implementation to be a StateSet. Unfortunately, we ran into lack of support for StateSet metrics in an older version of Vector and it appears it's not supported in a newer release either. I see references to the type in proto but no actual support for scraping.

Here's an example of a metric generated by kube-state-metrics that we want to use Stateset with kubernetes/kube-state-metrics#2070 (comment)

Attempted Solutions

No response

Proposal

No response

References

kubernetes/kube-state-metrics#2070 (comment)

Version

0.30.0

@aliaqel-stripe aliaqel-stripe added the type: feature A value-adding code addition that introduce new functionality. label Jun 6, 2024
@jszwedko jszwedko added the platform: kubernetes Anything `kubernetes` platform related label Jun 6, 2024
@jszwedko
Copy link
Member

jszwedko commented Jun 6, 2024

Hi @aliaqel-stripe ,

I think I'm missing some context here (maybe due to my lack of familiarity with Kubernetes). What is the change to Vector that you are asking for exactly?

@aliaqel-stripe
Copy link
Author

Hi @jszwedko!

Sorry about lack of clarity. The change I'm asking is that scraping of these types of metrics is implemented. I see that vector is aware of these types of metrics but when the metrics are served on a prometheus metrics endpoint,, vector does not know what to do with them

2024-06-06T15:01:06.534735Z ERROR source{component_kind="source" component_id=kube-state-metrics component_type=prometheus_scrape component_name=kube-state-metrics}: vector::internal_events::prometheus: Parsing error. url=http://127.0.0.1:8088/metrics error=WithLine { line: "# TYPE kube_customresource_scaledobject_status_condition stateset", kind: InvalidMetricKind { input: "stateset" } } error_type="parser_failed" stage="processing" internal_log_rate_limit=true

@aliaqel-stripe
Copy link
Author

aliaqel-stripe commented Jun 7, 2024

Not necessarily a kubernetes specific thing, but StateSet a metric type in OpenMetrics (https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#stateset)

For reference, this is how OpenTelemetry handles conversions of StateSets to their type of metrics https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#stateset

@jszwedko
Copy link
Member

jszwedko commented Jun 7, 2024

Ah, I see, it is a different metric type. Thanks for the additional context. This would be an enhancement to our metrics data model (likely) and then the Prometheus text parser.

@jszwedko jszwedko added source: prometheus_scrape Anything `prometheus_scrape` source related source: prometheus_remote_write Anything `prometheus_remote_write` source related source: prometheus_pushgateway Anything `prometheus_pushgateway` source related labels Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: kubernetes Anything `kubernetes` platform related source: prometheus_pushgateway Anything `prometheus_pushgateway` source related source: prometheus_remote_write Anything `prometheus_remote_write` source related source: prometheus_scrape Anything `prometheus_scrape` source related type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants