ElasticSearch client support

281 views
Skip to first unread message

Henri Gomez

unread,
Jun 12, 2017, 11:49:14 AM6/12/17
to Glowroot
Hi all

First, thanks for Glowroot, an amazing APM who goes better and better after each releases

There is many plugins to track long running executions (remote) like cassandra, jdbc, jms, http or redis.

I was wondering about ElasticSearch Client support as I used a mix of JDBC and ES calls and this is the missing part.
Is it something planned ?

If not, how would you suggest to implement this ?
For Cassandra/JDBC there is Java code but JMS/Redis are implemented via json definitions.

Thanks a lot

Trask Stalnaker

unread,
Jun 20, 2017, 2:45:42 AM6/20/17
to Glowroot
Thanks for the kind words.

An ElasticSearch plugin would be a great addition.

I did some copy-paste from the Cassandra plugin and got something started at https://github.com/trask/glowroot

(note the commit prior to the Elasticsearch plugin "Add codeSource when testing with local container" is needed for running the Elasticsearch plugin tests)

Thanks,
Trask

Henri Gomez

unread,
Jun 20, 2017, 3:21:16 PM6/20/17
to Trask Stalnaker, Glowroot
Great news

I'll have a look and keep you posted ;)

--
You received this message because you are subscribed to a topic in the Google Groups "Glowroot" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/glowroot/IkMxfx1waF0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to glowroot+unsubscribe@googlegroups.com.
To post to this group, send email to glow...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glowroot/5def6155-dd76-49e6-b8bd-d93b270ed162%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Henri Gomez

unread,
Jun 21, 2017, 12:25:38 PM6/21/17
to Trask Stalnaker, Glowroot
Just had a try and it's promising.

I could see SQL and ES which is great.
ES requests parameters are marked FIXME, is it something you'll work on ?

Good job !

Trask Stalnaker

unread,
Jun 26, 2017, 2:26:08 AM6/26/17
to Glowroot, trask.s...@gmail.com
Hi Henri,

Check out the latest on my fork.

Thanks,
Trask

Henri Gomez

unread,
Jun 26, 2017, 7:58:26 AM6/26/17
to Trask Stalnaker, Glowroot
Thanks Trask

Just tried it but got exceptions on application side

Caused by: java.lang.NoSuchMethodError: org.elasticsearch.action.search.SearchRequest.source()Lorg/elasticsearch/search/builder/SearchSourceBuilder;
    at org.elasticsearch.action.search.SearchRequest.glowroot$source(SearchRequest.java)
    at org.glowroot.agent.plugin.elasticsearch.ActionRequestBuilderAspect.getQueryMessageSupplier(ActionRequestBuilderAspect.java:254)
    at org.glowroot.agent.plugin.elasticsearch.ActionRequestBuilderAspect.access$300(ActionRequestBuilderAspect.java:41)
    at org.glowroot.agent.plugin.elasticsearch.ActionRequestBuilderAspect$ExecuteAdvice.onBefore(ActionRequestBuilderAspect.java:129)
    at com.mycorp.server.es.request.ProxySearchRequestBuilder.get(ProxySearchRequestBuilder.java)
 
I see you're using ES 5.4.2

As many others, we stick with LTS, so our application is using ES 2.4.5 (LTS) and sadly there was major refactoring between 2.4.x and 5.0.x (ie org.elasticsearch/client.transport (2.4.x) => org.elasticsearch.transport.client (5.x))

Is it possible to handle 2 versions at same time (may be elasticsearch24plugin / elasticsearch50plugin) ?

Thanks again for your amazing works

Trask Stalnaker

unread,
Jun 28, 2017, 1:07:43 AM6/28/17
to Glowroot, trask.s...@gmail.com
Sure, try latest now.

Thanks,
Trask

Henri Gomez

unread,
Jun 28, 2017, 2:53:20 AM6/28/17
to Trask Stalnaker, Glowroot
Tested and approved !
It works great

I added elasticsearch-plugin to agent distribution and it worked out of the box

diff --git i/agent/dist/pom.xml w/agent/dist/pom.xml
index bb2de0b..7a58172 100644
--- i/agent/dist/pom.xml
+++ w/agent/dist/pom.xml
@@ -28,6 +28,11 @@
     </dependency>
     <dependency>
       <groupId>org.glowroot</groupId>
+      <artifactId>glowroot-agent-elasticsearch-plugin</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.glowroot</groupId>
       <artifactId>glowroot-agent-executor-plugin</artifactId>
       <version>${project.version}</version>
     </dependency>


Do you plan to add it to 0.9.20 ?

Many thanks for this !

Trask Stalnaker

unread,
Jun 28, 2017, 2:56:42 AM6/28/17
to Henri Gomez, Glowroot
Yes, I will add to next release, can you open GitHub issue for tracking it?

Thanks,
Trask
To unsubscribe from this group and all its topics, send an email to glowroot+u...@googlegroups.com.

To post to this group, send email to glow...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glowroot/5def6155-dd76-49e6-b8bd-d93b270ed162%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Glowroot" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/glowroot/IkMxfx1waF0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to glowroot+u...@googlegroups.com.

To post to this group, send email to glow...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Glowroot" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/glowroot/IkMxfx1waF0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to glowroot+u...@googlegroups.com.

To post to this group, send email to glow...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Glowroot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glowroot+u...@googlegroups.com.

To post to this group, send email to glow...@googlegroups.com.

Henri Gomez

unread,
Jun 28, 2017, 2:57:01 AM6/28/17
to Trask Stalnaker, Glowroot
Sure

To unsubscribe from this group and all its topics, send an email to glowroot+unsubscribe@googlegroups.com.

To post to this group, send email to glow...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glowroot/5def6155-dd76-49e6-b8bd-d93b270ed162%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Glowroot" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/glowroot/IkMxfx1waF0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to glowroot+unsubscribe@googlegroups.com.

To post to this group, send email to glow...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Glowroot" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/glowroot/IkMxfx1waF0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to glowroot+unsubscribe@googlegroups.com.

To post to this group, send email to glow...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Glowroot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glowroot+unsubscribe@googlegroups.com.

sarath...@gmail.com

unread,
Oct 18, 2017, 7:19:34 PM10/18/17
to Glowroot
We downloaded and installed glowroot version  0.9.25. We want to interface glowroot to an elastic search endpoint which running in another cluster. Where to we mention the endpoint for elastic search in the configuration?
Sure

To unsubscribe from this group and all its topics, send an email to glowroot+u...@googlegroups.com.

To post to this group, send email to glow...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glowroot/5def6155-dd76-49e6-b8bd-d93b270ed162%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Glowroot" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/glowroot/IkMxfx1waF0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to glowroot+u...@googlegroups.com.

To post to this group, send email to glow...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Glowroot" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/glowroot/IkMxfx1waF0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to glowroot+u...@googlegroups.com.

To post to this group, send email to glow...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Glowroot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glowroot+u...@googlegroups.com.

Trask Stalnaker

unread,
Oct 18, 2017, 7:47:34 PM10/18/17
to Glowroot
Hi Sarathy,

Glowroot will monitor your application's Elasticsearch connections, but does not itself report to Elasticsearch.

Thanks,
Trask
Reply all
Reply to author
Forward
Message has been deleted
0 new messages