Application Insights and Service Fabric Micro services (stateful and stateless) - azure-service-fabric

I found many questions from several months back on Application Insights and Service Fabric and I'm wondering if there is any new information.
I would really like to get information for APIs (Stateful and state less service) response time, dependency, traces etc. In typical API, enabling and configuring the application insight with tracing and web api application insight, it shows the server response time, server requests and operation details.
Along with it, it will also have the dependency and tracing information. I would like to get same information for services running on the service fabric. I could add these by adding customize code using nuget like Microsoft.Diagnostics.EventListeners and Microsoft.Diagnostics.EventListeners.Fabric which allows to log the start and end with the custom code.Here are the links which I referred -
https://blogs.msdn.microsoft.com/cloud_solution_architect/2016/10/06/distributed-tracing-in-service-fabric-using-application-insights/
Application Insights in Service Fabric?
https://acom-feature-videos-twitter-card.azurewebsites.net/en-us/documentation/articles/service-fabric-diagnostics-application-insights-setup/
Thanks!

Related

API Management Service : How to import Service Fabric Cluster APIs?

We have created two APIs and deployed them to a Service Fabric Cluster, which exposes them as https://[clusterurl]:8100 and https://[ClusterURL]>:8101.
Now we want to expose these APIs via API Management Service, and we couldn't find any easy way to do so. There is one article at https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-tutorial-deploy-api-management, but it's really very hard to understand and relate it with this SDK.
We managed to create an API Management Service instance and also to create a blank API (or import through Swagger) using the SDK. But we don't know how to import the Service Fabric API.
And we could create an API Management BackEnd pointing to the Service Fabric app, but then we couldn't find any way to bind this BackEnd to any API created in the API Management Service.
Any help, sample, and/or pointing in right direction is greatly appreciated.
For service fabric integration to work you need:
VNET that includes both your SF cluster and APIM instance.
Backend entity: https://learn.microsoft.com/en-us/rest/api/apimanagement/backend/createorupdate it will let APIM know where your cluster is and provide it with necessary credentials to make calls.
set-backend-service policy: https://learn.microsoft.com/en-us/azure/api-management/api-management-transformation-policies#SetBackendService It's usually placed in inbound section of API that needs to talk to SF. You should omit "base-url" attribute, use "backend-id" to specify id of backend entity created in previous point, and other "sf-*" to configure how exactly call should be made.

Access to audit events of UAA (User Account and authentication) events in Swisscom cloud

Is it possible to get access to events generated by User Account and Authentication (UAA) server in the context of Swisscom Application Cloud?
It is essential for me, to be able to have an audit trail of actions executed by authorised operators through the API (that would include cli and portal).
What I am looking for is an alternative of AWS CloudTrail for IAM module, that you can turn on for specific VPCs / regions there.
I have found this in the CF documentation (https://docs.cloudfoundry.org/loggregator/cc-uaa-logging.html) but that (as far as I understand it) requires infrastructure level access.
Thanks a lot for any hints.
We can't expose UAA logs to individual customers since it contains probably sensitive information about other users or the platform.
You should be able to retrieve the logs of your application in the application logs (which you can send to a syslog drain, i.e. the ELK/Elasticsearch service).
All API interactions should be covered by this log stream, according to the documentation:
Users make API calls to request changes in app state. Cloud Controller, the Cloud Foundry component responsible for the API, logs the actions that Cloud Controller takes in response.
For example:
2016-06-14T14:10:05.36-0700 [API/0] OUT Updated app with guid cdabc600-0b73-48e1-b7d2-26af2c63f933 ({"name"=>"spring-music", "instances"=>1, "memory"=>512, "environment_json"=>"PRIVATE DATA HIDDEN"})
From https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html

Collections on watson discovery not being created and showing API timeout issue

Each time we look to create a collection on the discovery GUI using the API we are getting API timeout issues. This happens very erratically.
IBM provides one Website to see if the Services and Systems work fine. The site shows if have Maintenance and the Problems with the services.
I had the same problem with another service. My service works fine now. Verify if you service are ok and check if the service was with status no known issues too.
Check the error:
See the Website.

Can user provided services be shared across multiple apps

I am creating a logdrain service in Bluemix for my apps:
`cf cups myapps-logdrain -l <logdrain-endpoint>`
Can I bind the myapp-logdrain service to multiple apps at a time? I looked at the cloudfoundry documentation and played with the logdrain service from cf cli. Its settings don't specify whether or not it can be shared.
Yes. Log drain service(user provided service) can be shared just like any other service.
You can differentiate logs from different applications by querying for application GUID and/or instance number.
You may see logs similar to following format:
[Date][log-service-name][application guid][app-instance-number][log-message]
Apr 21 00:35:44 bluemixlogs
3398064b-8de6-46dd-egf1-0dde35546496/[App/0]: sending logs to 3rd party service
: some log info
In general user defined services in cloudfoundry can be shared across multiple apps. They are usually just configuration data that tell your app how it can connect to some other application or service.
Yet I have nod specific knowledge about the logdrain service.

Scaffolding/Mocking a REST service for client side development

There are two teams that are working on a REST service and a web client separably.
Is there a tool that scaffolds a REST service given a configuration can return a predetermined result for a URI+VERB combination?
Looking for the same thing. All I have found so far is this project SOAP/REST Mock Service
but I haven't tested it yet.