chr4-cookbooks / newrelic-ng

Chef cookbook to install and configure different monitoring services for newrelic
19 stars 13 forks source link

Feature Request: Support lables in php agent #32

Open ofir-petrushka opened 8 years ago

ofir-petrushka commented 8 years ago

Support application level labels.

"newrelic.labels" @ https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-configuration

(probably relevant for other languages as well)

chr4 commented 8 years ago

@jeffbyrnes contributed the php-agent code. Jeff, interested in contributing once more? :)

jeffbyrnes commented 8 years ago

@chr4 @ofir-petrushka unfortunately, I don’t have any cycles to help out with this right now.

I took a quick look through the code, and I’d suggest, whether it’s me or somebody else, refactoring the resources to be more future-proof, and allow an operator to pass in a hash of config values that’s directly translated to the config format. That way, we avoid having to keep up with changes New Relic makes with a 1:1 relationship of resource attributes/properties and cookbook attributes.

I just finished a refactor of the zookeeper cookbook, going from LWRPs to Chef 12.5 Custom Resources, and its zookeeper_config resource works in this fashion (see v7.0.0 @ lines 23–27 of config.rb).