.NET Components for Externalized Configuration, Database Connectors, Service Discovery, Logging and Distributed Tracing, Application Management, Security, and more.
Recent refactorings in #1334 changed the behavior of services.AddCloudFoundryOptions() to return "unknown" as the application name when running locally, instead of falling back to local settings. This change was observed in broken samples.
This PR restores the behavior that AddCloudFoundry() is a light-up feature: if not running on Cloud Foundry, it behaves the same as if services.AddApplicationInstanceInfo() was called.
Additionally, this PR ~adds explicit dependencies to Steeltoe.Configuration.CloudFoundry and~ removes the odd properties on IApplicationInfo that are specific to Cloud Foundry.
[x] You've updated unit and/or integration tests for your change, where applicable.
[ ] You've updated documentation for your change, where applicable.
If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.
[ ] There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
[ ] You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.
Description
Recent refactorings in #1334 changed the behavior of
services.AddCloudFoundryOptions()
to return "unknown" as the application name when running locally, instead of falling back to local settings. This change was observed in broken samples.This PR restores the behavior that
AddCloudFoundry()
is a light-up feature: if not running on Cloud Foundry, it behaves the same as ifservices.AddApplicationInstanceInfo()
was called.Additionally, this PR ~adds explicit dependencies to
Steeltoe.Configuration.CloudFoundry
and~ removes the odd properties onIApplicationInfo
that are specific to Cloud Foundry.Quality checklist