-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from newrelic/feat/org-limits
feat: add support for reporting org limits; refactored to be more generic... again
- Loading branch information
Showing
40 changed files
with
9,642 additions
and
3,870 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,57 @@ | ||
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: "55.0" | ||
token_url: "https://test.salesforce.com/services/oauth2/token" | ||
auth: { | ||
"grant_type": "password", | ||
"client_id": "", | ||
"client_secret": "", | ||
"username": "", | ||
"password": "" | ||
} | ||
auth_env_prefix: "MY_" | ||
cache_enabled: False | ||
redis: { | ||
"host": "", | ||
"port": "", | ||
"db_number": 0, | ||
"password": "", | ||
"ssl": True, | ||
"expire_days": 2 | ||
} | ||
date_field: "LogDate" | ||
generation_interval: "Hourly" | ||
time_lag_minutes: 300 | ||
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: CreatedData, | ||
rename_timestamp: actualTimestamp, | ||
api_ver: "58.0" | ||
}, | ||
{ | ||
query: "SELECT EventName, EventType, UsageType, Client, Value, StartDate, EndDate FROM PlatformEventUsageMetric WHERE TimeSegment='FifteenMinutes' AND StartDate >= {start_date} AND EndDate <= {end_date}", | ||
env: { | ||
end_date: "now()", | ||
start_date: "now(timedelta(minutes=-60))" | ||
}, | ||
api_ver: "58.0", | ||
timestamp_attr: StartDate, | ||
}, | ||
"other_queries.yml" | ||
] | ||
newrelic: | ||
data_format: "events" | ||
api_endpoint: "US" | ||
account_id: "" | ||
license_key: "" | ||
|
||
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: "55.0" | ||
token_url: "https://test.salesforce.com/services/oauth2/token" | ||
auth: | ||
grant_type: password | ||
client_id: "ABCDEFG" | ||
client_secret: "ABCD1234" | ||
username: salesforce_user | ||
password: "MY_SALESFORCE_PASSWORD" | ||
auth_env_prefix: MY_ | ||
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: "55.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: "58.0" | ||
- query: "SELECT EventName, EventType, UsageType, Client, Value, StartDate, EndDate FROM PlatformEventUsageMetric WHERE TimeSegment='FifteenMinutes' AND StartDate >= {start_date} AND EndDate <= {end_date}" | ||
env: | ||
end_date: "now()" | ||
start_date: "now(timedelta(minutes=-60))" | ||
api_ver: "58.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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ wheel==0.38.1 | |
setuptools==65.5.1 | ||
future~=0.18.2 | ||
newrelic==9.7.0 | ||
coverage~=7.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.