Comments (9)
maybe this is OK (Prometheus can ingest this JSON) but confused me because in a bare Rack app /metrics is returned in plain text.
from client_ruby.
@deepthawtz Which client version do you use? JSON support has been removed in v0.5.0 https://github.com/prometheus/client_ruby/releases/tag/v0.5.0
from client_ruby.
Text format was added in v0.3.0, so you seem to use a version between v0.3.0 and v0.5.0. The server uses HTTP content negotiation and will prefer text over json. The Prometheus server >= v1.0.0 doesn't support JSON anymore.
I strongly suggest to update your client library version, also have a look at the README. It's recommended to add a Gzip middleware as described there.
from client_ruby.
in my Gemfile.lock
I see prometheus-client (0.6.0)
from client_ruby.
steps to reproduce:
rails new poo
- add
gem 'prometheus-client'
to Gemfile &&bundle install
- update
config/application.rb
and add
require "prometheus/client/rack/collector"
require "prometheus/client/rack/exporter"
# ... in Rails::Application configuration
config.middleware.use Prometheus::Client::Rack::Collector
config.middleware.use Prometheus::Client::Rack::Exporter
from client_ruby.
ah... basically won't work w/o Rack::Deflater
I see now.. thanks
from client_ruby.
@deepthawtz What? How's that possible, the code path to respond with JSON is not longer available in v0.6.0. Can you double check that you don't have an older gem version installed and that your server really uses 0.6.0? Maybe log the client version puts Prometheus::Client::VERSION
.
Please re-open if you see a 0.6.0 client responding with JSON format.
from client_ruby.
odd. I see:
uninitialized constant Prometheus::Client::VERSION (NameError)
but
gem list | grep prometheus
prometheus-client (0.6.0)
no other versions are installed
and the prometheus-client code on disk definitely has lib/prometheus/client/version.rb
with VERSION
set to 0.6.0
still digging...
from client_ruby.
You might need to require the file first:
require 'prometheus/client/version'; puts Prometheus::Client::VERSION
On Wed, Aug 31, 2016 at 12:22 PM Dylan Clendenin [email protected]
wrote:
odd. I see:
uninitialized constant Prometheus::Client::VERSION (NameError)
but
gem list | grep prometheus
prometheus-client (0.6.0)no other versions are installed
and the prometheus-client code on disk definitely has
lib/prometheus/client/version.rbstill digging...
—
You are receiving this because you modified the open/close state.Reply to this email directly, view it on GitHub
#30 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAANaBAKE0qW6RkpQBcvskry42WSi177ks5qlapCgaJpZM4Jxs2r
.
from client_ruby.
Related Issues (20)
- CPU usage growing over time with DirectFileStore HOT 1
- better path handling HOT 14
- Update README.md with changes to pushgateway client
- Update CHANGELOG.md for 3.0.0 release HOT 1
- `generate_path` yields incorrect values for Sinatra+Rack::Build apps HOT 6
- Exporter port option doesn't work HOT 2
- Counter metric is reset when it has no labels HOT 8
- ERROR: Permission to prometheus/client_ruby.git denied HOT 2
- The rack example does not work because of `Rack::Lint::LintError` HOT 1
- Aaup HOT 1
- How to metrify ActiveRecord sql queries and Redis jobs (sidekiq/resque)? HOT 1
- pushing metrics with instance grouping_key would result: instance is reserved HOT 6
- Fix `Rack` deprecation warning
- Improving DirectFileStore for performance and scalability HOT 18
- Implement native histograms support HOT 4
- cannot load such file -- prometheus/middleware/collector (LoadError) HOT 2
- Job name for pushgateway can't be a symbol HOT 1
- UTF-8: Implement support in Ruby client library HOT 5
- How can I change how paths are labelled? HOT 1
- undefined method `unpack1' for String (NoMethodError) when use in ruby < 2.4 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from client_ruby.