Skip to content

Commit

Permalink
Change container metadata to use CONTAINER_APP_REPLICA_NAME (#2099)
Browse files Browse the repository at this point in the history
Replace environment variable HOSTNAME with CONTAINER_APP_REPLICA_NAME.
  • Loading branch information
marioleed authored Feb 21, 2024
1 parent af1a612 commit c721e27
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public ValueTask<ContainerAppMetadata> 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));
}
Expand Down

0 comments on commit c721e27

Please sign in to comment.