newrelic / newrelic-salesforce-exporter

New Relic integration for Salesforce logs.
Apache License 2.0
10 stars 15 forks source link

Incorrect License Key Error in New Relic Python Agent - newrelic-salesforce-exporter #43

Closed suneelmanne closed 4 months ago

suneelmanne commented 4 months ago

Description: While running the newrelic-salesforce-exporter with the New Relic Python Agent, an error occurs indicating that the license key provided is incorrect. This prevents the agent from functioning correctly and disrupts the integration with New Relic services. The error is consistent and reproducible, appearing multiple times during execution.

Steps to Reproduce Open a command prompt or terminal. Navigate to the project directory:

cd C:\Users\XXX\Workspace\newrelic-salesforce-exporter Run the script: python src/main.py

Observe the error messages related to the incorrect license key in the console output.

Expected Behavior The New Relic Python Agent should initialize and run without reporting any license key errors if the key is correctly configured. It should connect to New Relic’s data collector without issues and allow monitoring and data collection.

Operating System: Windows 10 Pro, Version 22H2 Python Version: 3.10.6 New Relic Python Agent Version: 9.7.0 Project: newrelic-salesforce-exporter Execution Environment: Local development environment

new relic config file format : newrelic: data_format: events api_endpoint: US account_id: "XXXX" license_key: "7cc80557a8262fe2266b34fd91e583b4FFFFNRAL"

screen shot for reference :

cmd license error
sdewitt-newrelic commented 4 months ago

Hi @suneelmanne thanks for the report. Please see this note in the documentation. The license_key in the config file is not used for the agent. You'll need to set a separate NEW_RELIC_LICENSE_KEY environment variable for that. The reason for this is that the agent initializes far earlier than when we read the config file so there is no way for us to tell the agent to use the license key from the config file.

suneelmanne commented 4 months ago

Thank you