Azure / azure-functions-java-worker

Java runtime and core types for Microsoft Azure Functions
MIT License
87 stars 54 forks source link

Add test logics for app insight #735

Closed kaibocai closed 11 months ago

kaibocai commented 11 months ago

Issue describing the changes in this PR

Add test logic for app insight

This PR adds basic verification for the application insight agent. It verifies the agent version is present in the AI portal trace table. Every time you want to trigger a test running against a specific agent version just update the agent version in azure-pipelines.yml (to avoid mismatch between java worker build pipeline and nightly build pipeline you should also update agent version in azure-pipelines-e2e-integration-tests.yml) and draft a PR, and the test will automatically run inside the build pipeline of java worker.

The application insight is created under subscription simple batch which contains all end2end resources for this repo.

Added 4 new envs to the pipeline:

  1. ApplicationInsightAPIKey: used when query the appinsight portal.
  2. ApplicationInsightAPPID: used when query the appinsight portal.
  3. APPLICATIONINSIGHTS_CONNECTION_STRING: appinsight connection string
  4. APPLICATIONINSIGHTS_ENABLE_AGENT: enable appinsight agent.

Pull request checklist

Additional information

Additional PR information