Hystrix dashboard keeps loading in Cloud foundry even though it works in local - spring-cloud-netflix

I have built .net core microservices and deployed in PCF. I have implemented the hystrix circuitbreaker using Pivotal steeltoe framework and Eureka Service discovery.
While running locally on my computer, it all works well, I get the ciruit-breaker to work as desired and see the Hystrix dashboard showing the right graphs.
Problem comes when I deploy the same to Pivotal Cloud foundry. In PCF, everything else works just as fine( service discovery is alright, I can make requests to my microservices, can see circuit breaker working as desired as it does on my local), but I can NOT find a way to get the Hystrix dashboard working. It keeps showing "loading..." instead of showing graphs.
Just for reference, I still can see the stream data in browser being streamed by my app running on PCF. I am using following URL to feed the stream to Hystrix dashboard:
https://my-cloudfoundry-app-route/hystrix/hystrix.stream
any idea what could I be doing wrong here? anyone else had such a problem? Any help is appreciated.

Related

Enable google maps api key in production environment

I made a flask app and deployed it to a linux server on Linode. It is running and some of my pages are working. For example, the contact page works. However, some of them have an inset google map. Upon loading one of these pages, my map is visible for a split second, then a big gray exclamation! and the map is blocked.
While testing the app using Flask's built in development server in my remote environment, all my functionality worked. When moving to a production environment, I used nginx and gunicorn. And I think I did it correctly. Judging that I do see the google maps working for just a second, it looks like this is not the issue.
Do I need to enable my google maps javascript api key for the production environment somehow?
When I have a look at your source code, I see
https://maps.googleapis.com/maps/api/js?key=None&callback=initMap
So, you did not add the API key, so it cannot work.
Please see https://developers.google.com/maps/documentation/javascript/get-api-key for how to get a key.

Access to Restricted data types and implement in development environment

We are developing application that needs write access to restricted data types. And looks like Google has stopped taking new request for whitelisting apps.
https://developers.google.com/fit/android/data-types#restricted_data_types
Note: Google has temporarily stopped taking new requests to write to restricted data types. We are updating our policy and process for reviewing requests and will update this documentation again when we resume.
Does anyone from Google have any idea when they will resume it?
Also: Is there a way to implement/write restricted data in development environment or debug build without whitelisting, and whitelist app before going to production?
There is no timeline yet for when this will be available.
(Source: I work on Google Fit)

Splitting web-app and mobile-app request in Yii2

I created a restful web-app platform using yii2 framework. It is working with no problems using a browser. Now I'm developing a mobile-app with angular and ionic and I'm searching for some guide to help me splitting the request from browser and app. Using the browser the web-app is configured to have a html view response, how can I detect a mobile-app request to change response in JSON format in each controller/action?
It's my first mobile-app development.
I just fighted this same war this week and I ended up splitting the folders and generating a new yii-app with fresh controllers just for the api.
I tried creating the api folder inside the web backend project, but I had to much problems with redirections, and as I was working from Android emulator fueled by Expo it was almost impossible to reach the api inside my localhost from outside.
At the end in the API REST you just reuse the database connection, rest of files are new. So there is no much to win in placing it in the same folder/project.
By the way, read this documentation: Implementing RESTful Web Service APIs in Yii2
As a code example you could check my yii2 web app: https://github.com/jvidalv/fempoble
And the api that works with the web: https://github.com/jvidalv/api-fempoble

Azure APIM Fails to Create API from Function App

When I try to create an API in APIM by using Create from Function App, I fill out the fields and click Create. The operation provides the wait dots and comes back in five seconds and says
Could not create an API. Please try again later.
I can create a blank API...but not one from an existing Function App. I have tried multiple combinations, No products, all products, no version, version..etc. No luck.
Thoughts?
Notes
The function in question is an HTTP Trigger.
The function works locally on my development box and in Azure.
APIM Tier is Developer
On that Function app, during Publish in Visual Studio I have reported that attempting to manage application settings before a publish fails and in trying to add a new one causes Visual Studio to unexpectedly close. Manage Application Settings on Publish Related, don't know.
Just a Ctrl + F5 solved the problem for me. Try it! ;)
I just ran into the same issue because I used Linux (Preview) instead of Windows. When I blew away the Function App and recreated a new one with Windows, my API Manager was able to create an API off it.
I have reproduce the same scenario. It is working for me. May I know, below details,
01.Hope you have tested your function and it is working fine.
02.What is the type of the function ? Hope that is "Http trigger" ?
03.What is you APIM tier ? (eg : development, basic etc.)
At this time the solution for me was to use Microsoft Edge instead of Chrome.
It seems Microsoft Azure portal is not working properly in Chrome and I noticed issues in several places. Parts of pages are not rendered at all and sometimes even errors like this pop up just because of the browser.
I had this same problem.
The fix was both simple and unexpected.
When importing the function app, simply enter "/" in the API URL Suffix field.
For me this changed the BaseURL field value. Originally it was just the host, ie http://hostname/. It then appended the endpoint the hostname, http://hostname/endpoint
This is done on the "Create Function from App" modal.
I had the same problem when trying to publish my Azure Functions application with several HTTP triggered functions through API Management running on Consumption plan. The plan did not have anything to do with the problem though.
What I did not realize was that my function app was not working properly when browsing it from the Azure portal. I had some configuration errors that prevented the app to work properly. When I resolved those, I succeeded to publish the application through APIM.
So, check that your application is working properly by browsing to it if you run into the problem described in this thread.
I had temporarily suspended (or stopped) my Function App. Restarting it resolved the problem.
I hope Azure could improve the error message, at least from UX perspective.
The issue was that the function did not actually work.
The Browse button that redirects to the page with the light bulb and the text Your function app version X is up and running did show, but the function still didn't work.
The function error had to be fixed before when importing to the APIM was done.

IBM Bluemix - Unable to import JSON through the Mobile Data GUI

I'm working on Manage data in IBM Bluemix from your hybrid mobile apps with IBM plugins for Apache Cordova. I have couple of problems with an ibm bluemix unable to get the appsecretid and unable to import JSON data to MobileData, But able to import image on to the MobileData.
I'm following this link http://www.ibm.com/developerworks/library/mo-bluemix-cordova-plugin/index.html to store data onto the cloud.
The application secret can be found in Mobile Application Security Dashboard on the Bluemix Console
For your second question I can't help much without a better idea of what errors you're encountering. The documentation link on that page is broken though, please find the correct Importing Data document here. If what you find there doesn't help you please let me know what specific error you're hitting on data import, if it is an issue with your specific json, and any network console debug you have from the attempt.
Regards