From c721e272ac20458ea720378562710f0f8abce077 Mon Sep 17 00:00:00 2001 From: Mario Sannum Date: Wed, 21 Feb 2024 15:53:36 +0100 Subject: [PATCH] Change container metadata to use CONTAINER_APP_REPLICA_NAME (#2099) Replace environment variable HOSTNAME with CONTAINER_APP_REPLICA_NAME. --- .../Services/EnvironmentContainerAppMetadataAccessor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Proto.Cluster.AzureContainerApps/Services/EnvironmentContainerAppMetadataAccessor.cs b/src/Proto.Cluster.AzureContainerApps/Services/EnvironmentContainerAppMetadataAccessor.cs index fc5f896393..19b18f9453 100644 --- a/src/Proto.Cluster.AzureContainerApps/Services/EnvironmentContainerAppMetadataAccessor.cs +++ b/src/Proto.Cluster.AzureContainerApps/Services/EnvironmentContainerAppMetadataAccessor.cs @@ -21,7 +21,7 @@ public ValueTask GetMetadataAsync(CancellationToken cancel { var containerAppName = Environment.GetEnvironmentVariable("CONTAINER_APP_NAME") ?? throw new Exception("No app name provided"); var revisionName = Environment.GetEnvironmentVariable("CONTAINER_APP_REVISION") ?? throw new Exception("No app revision provided"); - var replicaName = Environment.GetEnvironmentVariable("HOSTNAME") ?? throw new Exception("No replica name provided"); + var replicaName = Environment.GetEnvironmentVariable("CONTAINER_APP_REPLICA_NAME") ?? throw new Exception("No replica name provided"); return new(new ContainerAppMetadata(containerAppName, revisionName, replicaName)); }