https://github.com/gradientedge/msft-azure-test-functions
https://github.com/gradientedge/msft-azure-test-functions
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gradientedge/msft-azure-test-functions
- Owner: gradientedge
- Created: 2025-09-05T13:35:38.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-08T07:40:35.000Z (10 months ago)
- Last Synced: 2025-09-08T09:27:57.926Z (10 months ago)
- Language: TypeScript
- Size: 5.59 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# OTEL Azure Function Compatibility Test
## Purpose
This project is designed to **test Azure Function behavior** when making changes to APIs and configuration.
The goals are to ensure:
- **Backward compatibility** with existing OTEL (OpenTelemetry) configuration.
- **No loss of functionality or support** after updates or modifications.
## Usage
This function is intended to validate:
1. Changes in API endpoints.
2. Updates to function configuration.
3. Compatibility with OTEL tracing, logging, and metrics.
## Prerequisites
Before deploying, you need to:
- Create a Function App in the **Azure Portal**.
- Create a **Key Vault** and a secret named `my-secret`.
- Configure the Function App to have access permissions to the Key Vault.
## Running Tests
Each experiment includes a `run.sh` script, which runs the test end-to-end.
Before running, set the following environment variables:
```bash
RESOURCE_GROUP_NAME # The resource group where the Function App is deployed
FUNCTION_NAME # The name of the Function App used for experiments
ENDPOINT # The URL of the Function App
VAULT_ENDPOINT # The URL of the Key Vault
```
Run the script with:
```shell
cd functions/
./run.sh
```
## Resources
- [OTEL ESM Support](https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/esm-support.md)
The entire startup command should include the following `NODE_OPTIONS`:
| Node.js Version | NODE_OPTIONS |
| ----------------- | ----------------------------------------------------------------------------------------- |
| 16.x | `--require ./telemetry.cjs --experimental-loader=@opentelemetry/instrumentation/hook.mjs` |
| >=18.1.0 <18.19.0 | `--require ./telemetry.cjs --experimental-loader=@opentelemetry/instrumentation/hook.mjs` |
| ^18.19.0 | `--import ./telemetry.mjs --experimental-loader=@opentelemetry/instrumentation/hook.mjs` |
| 20.x | `--import ./telemetry.mjs --experimental-loader=@opentelemetry/instrumentation/hook.mjs` |
| 22.x | `--import ./telemetry.mjs --experimental-loader=@opentelemetry/instrumentation/hook.mjs` |