question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Task] Expose `jvmId` through GraphQL query in target metadata

See original GitHub issue

@maxcao13 in doing this I have just noticed that the jvmId comes through in the HTTP REST API metadata, 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_

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewazorescommented, Sep 30, 2022

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 /:sourceTarget path param being an ID rather than the JMX service URL. I was experimenting with the -agent generating itself a UUID and including that when it published discovery updates about itself, too. Using the JVM hash ID as the ServiceRef ID for JMX discovery makes a lot of sense, rather than just using a UUID. If I add -core as a dependency to -agent, or if we otherwise make the JVM hash ID function available for use in the -agent, we can also have the agent produce consistent ID results for itself at discovery registration/publish time as what Cryostat would see when connecting to it over JMX.

1reaction
andrewazorescommented, Sep 30, 2022

I do think that the ServiceRef is the right place for the ID. I don’t think adding a reference to the jvmIdHelper to the ServiceRef is the best thing to do though. Better to put that wherever the ServiceRefs are instantiated and just pass the ID string in as a constructor parameter to the ServiceRef which holds it as an immutable field.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Example Queries - Tableau Help
The GraphQL schema tells you what queries are allowed. The schema defines the objects, object types, and attributes that you can get from...
Read more >
Expose user-defined meta-information via introspection API in ...
So, I guess what I am trying to say is, instead of trying to stuff all kinds of metadata inside GraphQL, we should...
Read more >
Gradle Plugin Usage | GraphQL Kotlin
graphqlDownloadSDL task requires target GraphQL server endpoint to be specified and can be executed directly from the command line by ...
Read more >
API Reference: ApolloServer - Apollo GraphQL Docs
A key-value cache that Apollo Server uses to store previously encountered GraphQL operations (as DocumentNode s). It does not store query results. Whenever ......
Read more >
GraphQL Content API - Contentful
Each Contentful space comes with a GraphQL schema based on its content model. ... ContentfulMetadata field is 1 for every entry or asset...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found