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

[QUERY] JMX metrics which aren't available initially, never recorded #1233

Closed
bigredmachine opened this issue May 6, 2020 · 3 comments
Closed
Milestone

Comments

@bigredmachine
Copy link

Query/Question
I'm finding that some JMX metrics I'm trying to record via Java Application Insights aren't being recorded.
The one's which aren't being recorded are the one's which take the longest to appear in JConsole after the application starts up.
I've turned on the SDKLogger to see what's happening, and getting the following error
'java.lang.IllegalArgumentException: Cannot find object name 'solr:dom1=core,dom2=YOURCOLLECTIONNAME,dom3=shard1,dom4=replica_n1,category=SEARCHER,scope=searcher,name=numDocs'', The PC will be ignored

The application I'm trying to record JMX metric for is Solr.
These collection specific JMX metrics aren't loaded until the collection is loaded, which can take a minute or two depending on how many collections there are to load.

So what I think is happening is Application Insights is trying to load the JMX value before it exists, finding it doesn't exist, and never retries to get the JMX later after is has been created.

Is there a way to allow for the JMX metric to take some time to appear, before giving up that it doesn't exist?

I'd also be interested in working out how to programmatically adding to the JMX metrics being recorded, via some extension/plugin, for this application I don't control the source for.
E.g. add them when they become available, or add dynamic JMX metrics which names change each time the application runs, e.g.
solr:dom1=jetty,name0=org,name1=eclipse,name2=jetty,name3=util,name4=thread,name5=QueuedThreadPool,name6=qtpRANDOMNUMBER,name=jobs
And add them for all collections, shards, replicas, without having to maintain a configuration file.
Or extracting the values from the Solr Metrics API into application insights, as another alternative.
https://lucene.apache.org/solr/guide/8_5/metrics-reporting.html
Possibly I could get them into Application Insights via the SLF4J Reporter, and LF4J java application insights appender. I'm thinking though this might just come through as traces, but would like to come through as performance counters.

Why is this not a Bug or a feature Request?
I'm not sure if this is a bug, or if this is supported?
Happy for this to be changed depending on what it is.

Setup (please complete the following information if applicable):

OS: Windows 10
IDE : N/A
Version of the Library used - Application Insights Java - 2.6.0
applicationinsights-core-2.6.0.jar
applicationinsights-logging-log4j2-2.6.0.jar
Solr - 8.1.1
JConsole

@MattUkIps2018
Copy link

Hi,

I'm seeing this issue also and so wondering when the fix will be published in a release build.

Many thanks.

@trask
Copy link
Member

trask commented Sep 22, 2020

Hi @MattUkIps2018, yes this is fixed and will be released in Preview.7 which we are targeting for end of this week

@trask
Copy link
Member

trask commented Sep 25, 2020

This is fixed now in Preview.7

@trask trask closed this as completed Sep 25, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jul 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants