https://github.com/moesif/moesif-gcp-function-python-example
Example using Moesif API Analytics with GCP Cloud Function
https://github.com/moesif/moesif-gcp-function-python-example
Last synced: 8 months ago
JSON representation
Example using Moesif API Analytics with GCP Cloud Function
- Host: GitHub
- URL: https://github.com/moesif/moesif-gcp-function-python-example
- Owner: Moesif
- Created: 2024-01-23T02:05:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-23T05:51:13.000Z (over 1 year ago)
- Last Synced: 2025-01-05T21:12:05.483Z (9 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Moesif GCP Cloud Function Example for Python
[Moesif](https://www.moesif.com) is an API analytics platform.
[moesif-gcp-function-python](https://github.com/Moesif/moesif-gcp-function-python)
is a middleware that logs API calls to Moesif for GCP Cloud Function.This example is a Python application with Moesif's API analytics and monitoring integrated.
## How to run this example.
Create a new GCP Cloud function from the console or command line and then deploy the function.
```
gcloud functions deploy python-http-function \
--gen2 \
--runtime=python311 \
--region= \
--source=. \
--entry-point=hello_get \
--trigger-http
````Note: Replace the cloud region of the function`
You will also want to add an environment vairable `MOESIF_APPLICATION_ID` with the value being your
application id from your Moesif accountGo to the URL of the Cloud function such as https://xxxx-xxxx.cloudfunctions.net/python-http-function
The API Calls should show up in Moesif.