github.com/waldiirawan/apm-agent-go/v2@v2.2.2/features/azure_app_service_metadata.feature (about) 1 Feature: Extracting Metadata for Azure App Service 2 3 Background: 4 Given an agent configured with 5 | setting | value | 6 | cloud_provider | azure | 7 8 Scenario Outline: Azure App Service with all environment variables present in expected format 9 Given the following environment variables are present 10 | name | value | 11 | WEBSITE_OWNER_NAME | <WEBSITE_OWNER_NAME> | 12 | WEBSITE_RESOURCE_GROUP | resource_group | 13 | WEBSITE_SITE_NAME | site_name | 14 | WEBSITE_INSTANCE_ID | instance_id | 15 When cloud metadata is collected 16 Then cloud metadata is not null 17 And cloud metadata 'account.id' is 'f5940f10-2e30-3e4d-a259-63451ba6dae4' 18 And cloud metadata 'provider' is 'azure' 19 And cloud metadata 'instance.id' is 'instance_id' 20 And cloud metadata 'instance.name' is 'site_name' 21 And cloud metadata 'project.name' is 'resource_group' 22 And cloud metadata 'region' is 'AustraliaEast' 23 Examples: 24 | WEBSITE_OWNER_NAME | 25 | f5940f10-2e30-3e4d-a259-63451ba6dae4+elastic-apm-AustraliaEastwebspace | 26 | f5940f10-2e30-3e4d-a259-63451ba6dae4+appsvc_linux_australiaeast-AustraliaEastwebspace-Linux | 27 28 # WEBSITE_OWNER_NAME is expected to include a + character 29 Scenario: WEBSITE_OWNER_NAME environment variable not expected format 30 Given the following environment variables are present 31 | name | value | 32 | WEBSITE_OWNER_NAME | f5940f10-2e30-3e4d-a259-63451ba6dae4-elastic-apm-AustraliaEastwebspace | 33 | WEBSITE_RESOURCE_GROUP | resource_group | 34 | WEBSITE_SITE_NAME | site_name | 35 | WEBSITE_INSTANCE_ID | instance_id | 36 When cloud metadata is collected 37 Then cloud metadata is null 38 39 Scenario: Missing WEBSITE_OWNER_NAME environment variable 40 Given the following environment variables are present 41 | name | value | 42 | WEBSITE_RESOURCE_GROUP | resource_group | 43 | WEBSITE_SITE_NAME | site_name | 44 | WEBSITE_INSTANCE_ID | instance_id | 45 When cloud metadata is collected 46 Then cloud metadata is null 47 48 Scenario: Missing WEBSITE_RESOURCE_GROUP environment variable 49 Given the following environment variables are present 50 | name | value | 51 | WEBSITE_OWNER_NAME | f5940f10-2e30-3e4d-a259-63451ba6dae4+elastic-apm-AustraliaEastwebspace | 52 | WEBSITE_SITE_NAME | site_name | 53 | WEBSITE_INSTANCE_ID | instance_id | 54 When cloud metadata is collected 55 Then cloud metadata is null 56 57 Scenario: Missing WEBSITE_SITE_NAME environment variable 58 Given the following environment variables are present 59 | name | value | 60 | WEBSITE_OWNER_NAME | f5940f10-2e30-3e4d-a259-63451ba6dae4+elastic-apm-AustraliaEastwebspace | 61 | WEBSITE_RESOURCE_GROUP | resource_group | 62 | WEBSITE_INSTANCE_ID | instance_id | 63 When cloud metadata is collected 64 Then cloud metadata is null 65 66 Scenario: Missing WEBSITE_INSTANCE_ID environment variable 67 Given the following environment variables are present 68 | name | value | 69 | WEBSITE_OWNER_NAME | f5940f10-2e30-3e4d-a259-63451ba6dae4+elastic-apm-AustraliaEastwebspace | 70 | WEBSITE_RESOURCE_GROUP | resource_group | 71 | WEBSITE_SITE_NAME | site_name | 72 When cloud metadata is collected 73 Then cloud metadata is null