Skip to content

Override New Relic agent configuration from User-Provided Service payload with user defined JAVA_OPTS #221

@bryancuster

Description

@bryancuster

As a follow up to #173, it would be valuable for the new_relic_agent framework to look at the current JAVA_OPTS, and only add to the configuration map if the key is not already defiened. This would allow users to override values if they desire.

Something along the lines of:

def apply_user_configuration(credentials, configuration, java_opts)
    credentials.each do |key, value|
        configuration[key] = value unless java_opts.contains_system_property("newrelic.config.#{key}")
    end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions