How to calculate Apdex score in AppDynamics? - appdynamics

I am wondering if there is a way I can use AppDynamics to calculate an Apdex score for my APIs and Apps. If so, what would be the best possible way to do so?

Yes - you can do this using ADQL / Analytics searches (assuming you have this licensed).
Without specifics I can only give you a general guide:
Ensure your API / Applications are instrumented - so response timings are captured
Enable Transaction Analytics (for the relevant Business Transactions / Application)
In Analytics use ADQL (https://docs.appdynamics.com/display/PRO21/ADQL+Reference) to actually do the Apdex calculation - and create an analytics metric from this per Business Transaction / Application (https://docs.appdynamics.com/display/PRO21/Create+Analytics+Metrics+From+Scheduled+Queries)
The metric can then be used in any Dashboards / Reports / Health Rule etc or exported using the Analytics API (https://docs.appdynamics.com/display/PRO21/Analytics+Events+API)

Related

Vision API quota/budget limit and API key security

I have never used Vision API before but recently I have found it very powerful for a project of mine. However I have two concerns regarding its budget limiting, in order to not get an unexpected bill:
Is it possible to set a monthly cost limit? I have been used to Compute Engine which gives me an almost exact cost of the month but this seems not possible here. Since I will be using the API for labelling I have set the label detections requests per minute and per user to a specific amount, also to be sure I have set the global request per minute and per user to the same amount, all the other quotas to 0. If I have understood correctly, setting the max calls quota per minute to 4, for example, should provide a maximum of 178560 calls per month, right? Should this limit my budget? Am I safe?
The API will be used as an API key in a mobile app. I have followed the code examples for iOS & Android and I have seen the key is written in the code. Is this safe? For a better security I have restricted the key to iOS/Android apps bundle and to Cloud Vision API only. Would it be a safe enough option?
Thanks everyone for any help!
Yes, it’s possible to set a monthly cost limit. Refer to this doc for more information about creating the budget, setting the budget scope, budget amount and threshold. Yes your understanding is correct by setting the max calls quota per minute to 4, it should provide a maximum of 178560 calls per month. It shouldn’t limit the maximum quotas.
API keys that are embedded in the code are not safe and secured.
Do not embed API keys directly in code. API keys that are embedded in code can be accidentally exposed to the public. For example, you may forget to remove the keys from code that you share. Instead of embedding your API keys in your applications, store them in environment variables or in files outside of your application's source tree.
Refer to this doc for more information about best practices for securing an API key.
Edit based on a question in the comment:
Can the quotas be seen as a hard limit?
The quotas might be seen as a hard limit only if you don't have any other resources running in your GCP project other than Vision API requests. Refer to this doc for more information about capping API usage.
If you want to set a hard limit and disable billing, configure a Cloud Function to call the Cloud Billing API that disables billing for the project as described in the GCP doc.
Note: Use this feature only if you want to stop the spending and might be willing to shutdown all your Google Cloud services and usage when your budget limit is reached.

creating health check API

I am trying to create a healthCheck APi for our spring mvc (5.2.1)application in traditional XML config.
I want to capture details like
cpu utilization
memory consumption details
threads in use
database in check
checking for some 3rd party services like smtp,sms service etc
Is there any library that is readily available which provides all these details or I need to implement it in the application.
Thought to use dropwizard metrics but it doesn't give any details except status for built in healthcheck.So is the indigenous way to build this health check API right way?I just want to be sure that I am going on the right path?
PS:we are going to migrate the application to google cloud.Can we use some google analytics ?

How to handle daily calculations in a web application (Google Firebase/NestJS)

I am building a web app with the following stack:
UI - React
Backend framework - NestJS
Infrastructure - Google Firestore document DB, services deployed in Heroku
I need to calculate finance portfolio metrics on a daily basis for all users and display them when the user logs in. I am in a bit of a dilemma what approach to take and I have several ideas, so I hope you can give me some guidance.
Scheduled microservice
I can build and schedule a microservice in Python (the finance framework is in Python) that will run every day and calculate the needed metrics for the users and update the database. Seems straightforward but it might consume a lot of compute resources, especially when the user base grows large.
Cloud Functions
Google Firestore supports cloud functions that can trigger on specific events. I can leverage that and run the calculation microservice when the data is requested - that way I will calculate the information only on-demand. The downside is that if the data has not been requested for a long time, I will have to calculate the metrics for a larger period of time and this might take a while.
P.S. Just saw that there are also scheduled cloud functions - possible implementation might check if the data is calculated today (user has logged in at least once) and if not, calculate it.
I will be happy to discuss any other options that might be available.

Audit logging CosmosDB

Wanting to validate my ARM template was deployed ok and to get an understanding of the telemetry options...
Under what circumstances do the following get logged to Log Analytics?
DataPlaneRequests
MongoRequests
QueryRuntimeStatistics
Metrics
From what I can tell arduously in the last few days connecting in different ways.
DataPlaneRequests are logged for:
SQL API calls
Table API calls even when the account was setup for SQL API
Graph API calls against an account setup for Graph API
Table API calls against an account setup for Table API
MongoRequests are logged for:
Mongo requests even when the account was setup for SQL API
However I haven't been able to see anything for QueryRuntimeStastics (even when turning on PopulateQueryMetrics) nor have I seen any AzureMetrics appear?
Thanks Alex for spending time and trying out different options of logging for Azure Cosmos DB.
There are primarily two types of monitoring paths for Azure Cosmos DB.
Metrics: These are low latency (<5 min) and aggregated metrics which are exposed on Azure Monitor API for consumption. THese metrics are primarily used for diagnosis of the app for any live site issues.
Logs: These are raw request logs coming at 2hours+ latency and are used for customer for primarily audit scenarios to understand who accessed the data.
Depending on your need you can choose either of the approaches.
DataPlaneRequests by default shows all the requests across all the API's and Mongo Requests only show Mongo specific calls. Please note Mongo requests would also be seen in Data Plane requests.
Metrics would not be see in Log Analytics due to a knowwn which our partner team is fixing.
Let me know if you have any further questions here.

Tracking CPU and memory usage with Google Analytics

I'm looking for a good way to track CPU and memory usage for a variety of web applications and to be able to cross-reference this information with information on Google Analytics. For example, I'd like to be able to generate a report that shows the CPU and memory usage along with number of hits averaged over minute periods. One way I thought this could be solved is by adding custom page-level variables to Google Analytics for tracking CPU and memory usage. My questions:
For those familiar with GA reporting as it pertains to custom variables, is this possible?
Is there a better way to generate the kind of report I'm seeking? Perhaps even without using GA?
Thanks.
You can use the Google analytics API to push this data directly from the web page via javascript, or from the server using whatever language is relevant.
I've seen at least one large implementation use the API for UX A/B testing by way of event tracking, but there's no reason you couldn't store whatever related data you'd like.

Resources