Skip to content

The integration does not throw an error, but does not send data to New Relic with some warning message #52

Open
@gogoidaa101

Description

@gogoidaa101

Description
I'm trying to set up the integration of New Relic with Salesforce, but the data is not sent to New Relic despite not generating any error logs.
Only the configuration file (config.yml) has been updated with customer ID, secret, username, password and token data. No other modifications were made to the rest of the source code.

Expected Behavior
SF log information sent to New Relic and visible through the standard Dashboard available in New Relic I/O

Relevant Logs / Console output
{"message": "Downloading log lines for log file: /services/data/v60.0/sobjects/EventLogFile/0ATJ4000001EbzXOAS/LogFile", "timestamp": 1725339696826, "level": "info"}
{"message": "Sent 1000 log messages.", "timestamp": 1725339697099, "level": "info"}

Warning message:
Retrying (Retry(total=2, connect=3, read=2, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='tplcrm.my.salesforce.com', port=443): Read timed out. (read timeout=5)")': /services/data/v60.0/query?q=SELECT+Id,+Name,+BillingAddress+FROM+Account

image (1)
image (2)

Sharing below the config file. Let me know if I have missed anything on that:

`integration_name: com.newrelic.labs.sfdc.eventlogfiles
run_as_service: False
cron_interval_minutes: 60
service_schedule:
hour: "*"
minute: "0,15,30,45"
instances:

  • name: sfdc-logs
    arguments:
    api_ver: "60.0"
    token_url: "https://login.salesforce.com/services/oauth2/token"
    auth:
    SF_grant_type: password
    SF_client_id: "3MVG9pe2TCoA1Pf7VL***********0XyJSgV2bWmm8Ere03"
    SF_client_secret: "AD767F9C363F15659FA7A64C2C45B3A"
    SF_username: a.g@ti
    oup.com
    SF_password: "g****@09
    es
    $$"
    auth_env_prefix: SF_
    cache_enabled: False
    redis:
    host: my.redis.test
    port: 6379
    db_number: 0
    password: "MY_REDIS_PASSWORD"
    ssl: True
    expire_days: 2
    date_field: LogDate
    generation_interval: Hourly
    time_lag_minutes: 300
    queries:
    • query: "SELECT * FROM Account"
    • query: "SELECT * FROM SetupAuditTrail"
      limits:
      api_ver: "60.0"
      names:
      • ActiveScratchOrgs
      • DailyApiRequests
        logs_enabled: yes
        labels:
        environment: production
        queries:
  • query: "SELECT Id,EventType,CreatedDate,LogDate,LogFile,Interval FROM EventLogFile WHERE CreatedDate>={from_timestamp} AND EventType='API' AND Interval='{log_interval_type}'"
  • query: "SELECT Id,Action,CreatedDate,DelegateUser,Display FROM SetupAuditTrail WHERE CreatedDate>={from_timestamp}"
    timestamp_attr: CreatedDate
    rename_timestamp: actualTimestamp
    api_ver: "60.0"
  • query: "SELECT Value, StartDate, EndDate FROM PlatformEventUsageMetric WHERE StartDate >= {start_date} AND EndDate <= {end_date}"
    env:
    end_date: "now()"
    start_date: "now(timedelta(minutes=-60))"
    api_ver: "60.0"
    timestamp_attr: StartDate
    newrelic:
    data_format: events
    api_endpoint: US
    account_id: "MY_NEW_RELIC_ACCOUNT_ID"
    license_key: "MY_NEW_RELIC_LICENSE_KEY"`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions