From a1b6e708a1095d9182a72b42fa77c5b8ff40940e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 18:12:28 +0000 Subject: [PATCH 1/2] feat: Implement missing Python samples This change adds four new Python samples to the repository, bringing it closer to feature parity with the Node.js samples. The new samples are: app-distribution-feedback-to-jira, call-vertex-remote-config-server, instrument-with-opentelemetry, and remote-config-server-with-vertex. --- .../README.md | 31 +++ .../firebase.json | 17 ++ .../functions/main.py | 241 ++++++++++++++++++ .../functions/requirements.txt | 2 + .../README.md | 81 ++++++ .../firebase.json | 32 +++ .../functions/main.py | 125 +++++++++ .../functions/requirements.txt | 3 + .../instrument-with-opentelemetry/README.md | 27 ++ .../firebase.json | 18 ++ .../functions/main.py | 83 ++++++ .../functions/requirements.txt | 11 + .../functions/tracing.py | 39 +++ .../README.md | 50 ++++ .../firebase.json | 6 + .../functions/main.py | 113 ++++++++ .../functions/requirements.txt | 3 + 17 files changed, 882 insertions(+) create mode 100644 Python/app-distribution-feedback-to-jira/README.md create mode 100644 Python/app-distribution-feedback-to-jira/firebase.json create mode 100644 Python/app-distribution-feedback-to-jira/functions/main.py create mode 100644 Python/app-distribution-feedback-to-jira/functions/requirements.txt create mode 100644 Python/call-vertex-remote-config-server/README.md create mode 100644 Python/call-vertex-remote-config-server/firebase.json create mode 100644 Python/call-vertex-remote-config-server/functions/main.py create mode 100644 Python/call-vertex-remote-config-server/functions/requirements.txt create mode 100644 Python/instrument-with-opentelemetry/README.md create mode 100644 Python/instrument-with-opentelemetry/firebase.json create mode 100644 Python/instrument-with-opentelemetry/functions/main.py create mode 100644 Python/instrument-with-opentelemetry/functions/requirements.txt create mode 100644 Python/instrument-with-opentelemetry/functions/tracing.py create mode 100644 Python/remote-config-server-with-vertex/README.md create mode 100644 Python/remote-config-server-with-vertex/firebase.json create mode 100644 Python/remote-config-server-with-vertex/functions/main.py create mode 100644 Python/remote-config-server-with-vertex/functions/requirements.txt diff --git a/Python/app-distribution-feedback-to-jira/README.md b/Python/app-distribution-feedback-to-jira/README.md new file mode 100644 index 0000000000..0609435208 --- /dev/null +++ b/Python/app-distribution-feedback-to-jira/README.md @@ -0,0 +1,31 @@ +# Send in-app feedback to Jira + +This [code](functions/main.py) demonstrates how to use a Firebase Cloud Function triggered by an +[in-app feedback Firebase Alert from App Distribution](https://firebase.google.com/docs/functions/beta/reference/firebase-functions.alerts.appdistribution.inappfeedbackpayload), +and stores the feedback details (including screenshot) in Jira. + +You can customize this code to work with your own Jira configuration (eg on-premise support, custom issue types, etc). + +## Quickstart + +This sample code uses Jira's built-in APIs to create issues for in-app tester feedback. For simplicity it uses [basic authorization](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/). + +1. [Generate an API token](https://id.atlassian.com/manage-profile/security/api-tokens) via your Jira profile. + + + Note: If the tester who files feedback does not have a Jira account, the user who generates this token will be marked as the issue's reporter. +2. This [code](functions/main.py) uses [parameterized configuration](https://firebase.google.com/docs/functions/config-env#params) to prompt for the required configuratio. To start the process, run: + ```bash + $ firebase deploy + ``` + This will store the `API_TOKEN` using [Google Cloud Secret Manager](https://cloud.google.com/secret-manager) and the remaining settings in an `.env` file which will contain the following variables, customized to your Jira project: + ```bash + JIRA_URI="" + PROJECT_KEY="" + ISSUE_TYPE_ID="" + ISSUE_LABEL="