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

Process JMX beans with an ArrayList value #580

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sdarlington
Copy link

Based on the discussion in other pull requests, I'm creating this "for debate" rather than with the expectation that will be merged in its current state!

Basically, Apache Ignite (and others as far as I can tell) export certain JMX metrics as an ArrayList. It's not possible to directly bring this into Prometheus but returning the number of entries works reasonably well in this case. Are there better alternatives?

@fstab
Copy link
Member

fstab commented Mar 20, 2021

Hi Stephen, sorry for responding so late.

Reading Apache Ignite's documentation I see that they have a JMX bean Connections with a list of connections. In that case the size gives you the number of connections, which is a valuable metric.

However, I fear that this might be an exception. I suspect that in almost all cases the size of the list is not a meaningful metric at all. Are there other examples of List beans where the size is a meaningful metric?

@sdarlington
Copy link
Author

Fundamentally, there's a difference between how OpenCensus and JMX see the world. I see three options:

  1. If there's no direct mapping, we just ignore the values (the current behaviour)
  2. A hack, like this PR. It's not going to work for some (many? most?) use cases, but it may be better than nothing
  3. A general solution for mapping non-compliant JMX metrics to something in OpenCensus

I'm not sure what 3 would look like, so I went for 2. Without knowing what's in the array, I'm not sure what else we could do but count the number of entries?

I can also see the logic in 1, though I'd prefer to see it documented if that's the direction the project takes.

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

Successfully merging this pull request may close these issues.

2 participants