Skip to content

Commit eccba38

Browse files
authored
Merge pull request cloudfoundry#127 from pavankrish123/master
Deprecation warning for AppDynamics support
2 parents 8a343ea + 794a1fc commit eccba38

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/python/hooks/appdynamics.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,15 @@ func (h AppdynamicsHook) CreateAppDynamicsEnv(stager *libbuildpack.Stager, envir
144144
}
145145

146146
func (h AppdynamicsHook) BeforeCompile(stager *libbuildpack.Stager) error {
147+
if os.Getenv("APPD_AGENT") != "" {
148+
// APPD_AGENT is set => multibuildpack is used to configure appdynamics agent. Do nothing.
149+
return nil
150+
}
151+
152+
h.Log.Warning("[DEPRECATION WARNING]:")
153+
h.Log.Warning("Please use AppDynamics extension buildpack for Python Application instrumentation")
154+
h.Log.Warning("for more details: https://docs.pivotal.io/partners/appdynamics/multibuildpack.html")
155+
147156
vcapServices := os.Getenv("VCAP_SERVICES")
148157
services := make(map[string][]Plan)
149158

@@ -217,7 +226,6 @@ func (h AppdynamicsHook) BeforeCompile(stager *libbuildpack.Stager) error {
217226
func init() {
218227
logger := libbuildpack.NewLogger(os.Stdout)
219228
command := &libbuildpack.Command{}
220-
221229
libbuildpack.AddHook(AppdynamicsHook{
222230
Log: logger,
223231
Command: command,

0 commit comments

Comments
 (0)