Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

very small change to fix errors when handling datetime object from aws#422

Closed
wuarthur wants to merge 1 commit intoprometheus:masterprometheus/client_python:masterfrom
wuarthur:masterwuarthur/client_python:masterCopy head branch name to clipboard
Closed

very small change to fix errors when handling datetime object from aws#422
wuarthur wants to merge 1 commit intoprometheus:masterprometheus/client_python:masterfrom
wuarthur:masterwuarthur/client_python:masterCopy head branch name to clipboard

Conversation

@wuarthur
Copy link

@wuarthur wuarthur commented Jun 5, 2019

Hi, I am trying to export CreateDate using the aws-prometheus-exporter the exporter fails because of an error in [exposition.py ]

there seems to be an type error in this function, when v is expected to be a string, however sometimes aws return datas as an datetime object, which cause v.replace('\\', r'\\') errors out.
image

i found that this can be fixed by minimally changing line 78 in exposition.py to k, str(v).replace('\\', r'\\').replace('\n', r'\n').replace('"', r'\"'))

@wuarthur wuarthur force-pushed the master branch 2 times, most recently from c4272c5 to dba69f0 Compare June 5, 2019 18:08
Signed-off-by: Arthur Yang <yaqixyz@gmail.com>
@brian-brazil
Copy link
Contributor

Can you add a unittest for this?

@brian-brazil
Copy link
Contributor

This has gone stale, let us know if you still want to work on this.

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.