-
Notifications
You must be signed in to change notification settings - Fork 31
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
[Task] Expose jvmId
through GraphQL query in target metadata
#1076
Comments
Without looking at the code yet, I'm not sure how the query to
|
I think it could be useful to include the ID in the API results, actually. Clients may care about specific instances of a target, too. They should only be changing when the JVM restarts, and up to now the only way for a client to know that that has happened has been to be subscribed for WebSocket notifications and use those to update some locally-held state. With the jvmId field present it's now possible for a client to simply periodically poll the REST API or GraphQL API and determine if restarts have happened too, by just comparing the current poll result to the previous one. Also, I think there's a use case for the cryostat-agent to publish itself with a jvmId as well since it does not necessarily have a meaningful JMX connectUrl, though I haven't yet fleshed out my ideas here exactly. I'm thinking something along the lines of your new beta |
Just to make sure I don't spend wasted time on changes that shouldn't be, does it make sense to add the jvmId to the ServiceRef object which is part of the TargetNode as the main place to query it from? And maybe add the jvmIdHelper to the object class as a lazy dependency which just gets the jvmId from the jvmIdHelper.get(this.serviceUri) whenever the ServiceRef object is constructued? |
I do think that the |
The reason I was tinkering around with that ID in the ServiceRef is also related to the comment I made the other day about the new beta API handlers and the |
@maxcao13 in doing this I have just noticed that the
jvmId
comes through in the HTTP REST APImetadata
, but it isn't available to query via GraphQL. Would you mind taking a look at that?Originally posted by @andrewazores in https://github.com/cryostatio/cryostat/issues/964#issuecomment-1252439523
The text was updated successfully, but these errors were encountered: