-
Notifications
You must be signed in to change notification settings - Fork 25
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
Support for JRuby #142
Comments
|
I'm hitting the following error after removing the dependency on
Supporting JRuby in the agent will help us collect metrics efficiently. |
Hi @Adithya-copart, Re: json vs. Oj - this should work fine as Oj is a drop in replacement that we used for faster json encoding.
Cool :-)
The test suite runs some puma webservers in background threads - this appears to be related to and should be limited to the test suite.
My guess is that it is unrelated to the gem change. Since we haven't added official JRuby support, this hasn't been thoroughly tested. It's possible that that error is transient and eventually resolves on its own. Could you confirm this? Do your JRuby processes show up on the dashboard? |
@pglombardo Unfortunately, this did not resolve on its own. ruby-sensor/lib/instana/agent.rb Line 216 in 694b418
It occurs during the above PUT call to the agent.
I could not find the relevant code that handles this request in any of the public repositories. I suspect it is private. The agent probably uses the process info in the HTTP call to match against the list of running processes in its host. We're sending the I explored changing the process name using I'm not sure if this approach works but it'll be easy if instana agent supports this jruby process lookup. I used the following code within a irb session to replicate this error. I made sure that the
|
This is correct - the Instana host agent searches the process table for a matching process. The complexity comes when there are multiple processes with the same command line and/or in-container pids (like pid 1). There are steps to properly identify the correct process but obviously this hasn't been tested in JRuby. Is it possible that you could try this on Linux to confirm? There we use the /proc filesystem to identify processes on Linux and is more reliable than OSX (without /proc). |
@pglombardo The above results are from a docker container using linux. I was looking into the code and noticed that I will update it to |
EDIT: Nvm, I was using the cached gem. It worked with the file descriptor sharing.
|
Updates: I'm running into issues with the
ruby-sensor/lib/instana/collector.rb Lines 47 to 88 in 052fc3d
The After leaving the process for a little while, the only logs I see are the following POST calls from the thread and memory collectors:
Currently, I'm trying to see why Sinatra/Rack requests are not being reported. |
Nice progress :-) The metrics will get return 404 responses until the host agent is fully ready to relay the metrics so the 404s are expected for a short period after successful announce. |
Looks good so far. No instana related errors in the logs with Opened #148 |
#148 merged and released in gem 1.10.1 thanks @Adithya-copart! https://github.com/instana/ruby-sensor/releases/tag/1.10.1 |
@pglombardo We tried to use the rubygems version of This piece of code was a bad idea due to rubygems/rubygems#1662 (comment). Line 40 in 22cc0e1
The two options I came across were:
I came across an example of someone who ran into a similar problem: PR with Conditional: jnormington/dotdiff#16 |
Ah that's right - I forgot about this bit. I need to build a local JRuby version with the platform flag set and push that separately to Rubygems... Give me a bit. |
I added the Now on jruby-9.2.7.0, gem install pulls the java version and no Oj gem :-) Could you give it a try? https://rubygems.org/gems/instana/versions/1.10.1-java |
Everything is good now. Thanks Peter! |
Hello,
Are there any plans to support JRuby in the future?
I scanned the repository for any
.c
files and did not find any. I noticed thatOj
uses native C-extensions apart frombyebug
andpry-byebug
in development.Is there a design limitation that would prevent the usage of this gem in JRuby?
I noticed 3 test failures while using stdlib
json
instead ofoj
.I'll try to dig deeper if there is nothing else that limits the usage in JRuby.
The text was updated successfully, but these errors were encountered: