Skip to content

Conversation

@tomprince
Copy link
Contributor

I'm not sure if this belongs as part of the client, or should be an external package that depends on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output is already utf-8 encoded.

@tomprince
Copy link
Contributor Author

Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're still reecnoding this here. Have you tested this on python3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. I missed this when doing the changes. I've now tested it against python 3.4 and the tests pass.

Note: the tests (but not the code) need twisted trunk to run (the http client being used was just recently ported).

@brian-brazil
Copy link
Contributor

That looks good, can you squash your commits please?

@tomprince
Copy link
Contributor Author

Done.

brian-brazil added a commit that referenced this pull request Nov 2, 2015
Add a twisted resource for exposing metrics via twisted.web.
@brian-brazil brian-brazil merged commit ad9b902 into prometheus:master Nov 2, 2015
@brian-brazil
Copy link
Contributor

Thanks!

@tomprince tomprince deleted the twisted-resource branch November 2, 2015 15:38
@paulcavallaro
Copy link

Uhh does this example code even work?

(prometheus)➜  ~ python
Python 2.7.10 (default, Aug 10 2015, 16:01:33)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import prometheus_client.twisted
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named twisted
>>> import prometheus_client

(prometheus)➜  ~ pip list prometheus
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
pip (7.1.0)
prometheus-client (0.0.13)
setuptools (18.0.1)
wheel (0.24.0)
(prometheus)➜  ~ pip show prometheus-client
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
---
Metadata-Version: 2.0
Name: prometheus-client
Version: 0.0.13
Summary: Python client for the Prometheus monitoring system.
Home-page: https://github.com/prometheus/client_python
Author: Brian Brazil
Author-email: brian.brazil@robustperception.io
License: Apache Software License 2.0
Location: /Users/pcavallaro/envs/prometheus/lib/python2.7/site-packages
Requires:

Looking at this pull request further, it looks like this was pulled in, but a newer version (0.0.14) hasn't been published with these twisted changes.

@brian-brazil Do you mind minting a new version with these twisted changes?

@brian-brazil
Copy link
Contributor

I've got a number of releases to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants