apitools / monitor Goto Github PK
View Code? Open in Web Editor NEWTrack, transform and analyze the traffic between your app and the APIs you use.
Home Page: https://www.apitools.com
License: MIT License
Track, transform and analyze the traffic between your app and the APIs you use.
Home Page: https://www.apitools.com
License: MIT License
usecase that i just encountered.
A middleware in service A, is calling service B.
using http.get(url)
But in my url variable I had some parameters with whitespace so it looked like
https://fd1ce27f-d10f592b97db.my.apitools.com/estimates/price?start_point=carre rocafort 80&end_point=carrer napols 180&channel=pandas
and gives me back a 400.
but if I converts " "
to %20
it works.
My point: have something that does this conversation automatically. or acceptswhitespaces
Or have better error message.
Thanks
I wanted to get current time in my middleware. Wanted to reconstruct it using os.date
and have access to year
, day
like describe in the Lua doc here http://www.lua.org/pil/22.1.html
Related with #39
It would be useful to have one endpoint to export/import a service's configuration (endpoint, pipeline) so that it can be then imported in a different monitor.
I don't know how feasible this is, but it seems that it's possible that the worker in charge of the crontab sometimes dies and doesn't wake up. We must investigate if this is a real issue, and devise a way to either make it less possible to fail (i.e. move all tasks to other workers, and leave the crontab worker as a "queue manager" only) and fault tolerant (for example, "check and wake" the crontab process when a new request is received, and 5 minutes have passed since the last check and wake).
For more information see here:
https://docs.apitools.com/blog/2015/01/15/a-slack-bot-without-a-server.html#comment-1940073688
Weird behavior I've just seen...
this won't do the post
local r = http.json.post(hookURL,'{"text": "'..msg..'","channel":"#'.. decoded_params.channel_name..'","icon_emoji":":cat:"}')
but this will do
local r = http.json.post(hookURL,'{"text": "'..msg..'","channel":"#'.. decoded_params.channel_name..'","icon_emoji":":cat:"}')
console.log(r)
on this middleware https://fdf2cfc6fadb.my.apitools.com/app/services/1/middlewares/bfadd6dd-6c82-446f-83ac-0e94ed4302a3
No idea why.
Currently we delete traces based on the number of traces alone.
This might not be enough: a bunch of big traces can consume all the available memory and make the monitor fail - this has caused us trouble with 1 user already. We should be erasing by memory consumption instead of by number. And we could probably remove really old traces (i.e. 1 week old).
I thought it was my fault but apparently not... I guess it's part of the angular app. but it's a very annoying bug when you are working with different services.
when you are on a service and you "command-click" (to open a new tab) on the name of another service, to open it's traces on a different tab. The first tab switch to this service.
I guess that's also what is causing trouble saving middleware, when you have multiple tabs open.
Below is a small fig.yml that I use to launch APITools and Redis.
Hope it can help others get started more quickly(assuming they already have fig installed).
apitools:
image: quay.io/3scale/apitools
ports:
- "7071:7071"
- "10002:10002"
links:
- redis:db
redis:
image: redis
I find the handling of mail a bit weird. We use Mandrill, not Sendgrid. But why would you need to integrate every provider and not just use SMTP credentials?
Then you would support any provider...
The middleware specs are hard-coded in the monitor. We should put some kind of mechanism in place to read from the apitools/middleware github repo instead / in addition to that.
How should we go about handling Gzip'd content we're receiving upstream from our API service provider?
Right now, in the trace, we're seeing '(binary)' for the content. We'd like to gunzip this and add to the trace.
Thanks!
When document parsed by cjson is serialized by luajson. Exception is raised because it can't serialize userdata (cjson.null). Should properly fix e1645f7
Currently APITools supports host based routing.
For our use case, we need path based routing.
e.g. http://www.mycompany.com/api/user, we need /api/user to route to an api
quick start as :https://docs.apitools.com/docs/on-premise/index.html
it works well, I can proxy request well,
but there's no data on traces page,
is there anything needs to be config?
today we've found with @kikito that http.string
serializer was not documented here: https://rawgit.com/APItools/monitor/master/doc/index.html
Would be great to add it in the doc :)
Hey. I want to check out the docs on https://docs.apitools.com/docs . But the website can't be reached anymore. Are there other ways that I can get to read the docs?
It seems that there is some redirection now, which makes the thing fail.
Steps to reproduce:
Today I faced some issues after deleting the default middleware and adding my own.
It looks like I could do use compressed JSON anymore...
@kikito found this.
It would be great to add a warning either:
json.decode
and you get the typical errorHi,
how can I change timezone on dashboard chart?
currently it is all UTC.
I seem to have developed a pretty severe memory leak in the nginx worker process after months of very smooth operation. I have not made any changes to the APItools configuration or pipelines in months.
I've rebooted and still seem to be plagued by 80-100% CPU usage and what appears to be a memory leak. It's growing at about 1MB of usage every two seconds.
I'm not really sure how to diagnose the issue and, hopefully, this is something you openresty/nginx gurus can help with. I'm running the latest APItools via Debian package install. There are very few requests to this instance, which is what is boggling my mind. Also, it's weird that it just cropped up out of nowhere.
In any case, please let me know what's needed for debugging, as there aren't many articles out there for tracking down memory leaks in nginx -- especially ones that seemingly came out of nowhere and for no reason whatsoever.
Thanks!
I've just installed the APItools monitor in my server according to On-Premise APItools Monitor. After adding a service, I can't see any traces on the "Traces" tab when I access my local APIs.
After diving into the source code of monitor
, I found that traces are saved here:
# lua/models/pipeline.lua
Trace:async_save(trace, ...)
Trace:async_save()
enqueue the trace object which will be actually saved later by Model:consume()
. And then, Model:consume()
is called by system.cron_trigger()
or system.cron_flush()
.
Finally, I found the route mapping here:
# lua/apps/api.lua
router:post( '/api/system/cron/flush' , r('system.cron_flush'))
router:post( '/api/system/cron' , r('system.cron_trigger')) -- async
I said god bless me when I am trying to POST to "/api/system/cron" manually, it did work! When I access my APIs, traces are generated and shown in list. Thank godness!
But my quessions here are:
Trying to run fig, but docker pull fails on mikz/grafana:latest because it doesn't exist anymore.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.