Skip to content

Commit

Permalink
feat: switch to elastic APM (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKolarik committed Dec 17, 2024
1 parent 3c14f9c commit 5e62621
Show file tree
Hide file tree
Showing 11 changed files with 1,389 additions and 2,100 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ Most IDEs have plugins integrating the used linter (eslint), including support f

### Environment variables

- `NEW_RELIC_LICENSE_KEY={value}` used in production to send APM metrics to new relic
- `NEW_RELIC_APP_NAME={value}` used in production to send APM metrics to new relic
- `NEW_RELIC_ENABLED=false` used in development to disable newrelic monitoring
- `ELASTIC_APM_SERVER_URL={value}` used in production to send APM metrics to elastic
- `ELASTIC_APM_SECRET_TOKEN={value}` used in production to send APM metrics to elastic
- `ELASTIC_SEARCH_URL={value}` used in production to send logs to elastic
- `SERVER_SESSION_COOKIE_SECRET={value}` used to read the shared session cookie
- `REDIS_URL` used in production to set the redis URL including credentials
- `DB_CONNECTION_HOST`, `DB_CONNECTION_USER`, `DB_CONNECTION_PASSWORD`, and `DB_CONNECTION_DATABASE` database connection details
13 changes: 13 additions & 0 deletions elastic-apm-node.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
active: process.env.NODE_ENV === 'production',
serviceName: 'globalping-auth',
serviceVersion: process.env.RENDER_GIT_COMMIT || require('./package.json').version,
logLevel: 'fatal',
centralConfig: false,
captureExceptions: false,
captureErrorLogStackTraces: 'always',
ignoreUrls: [ '/favicon.ico', '/health', '/amp_preconnect_polyfill_404_or_other_error_expected._Do_not_worry_about_it' ],
transactionSampleRate: 1,
exitSpanMinDuration: '2ms',
spanCompressionSameKindMaxDuration: '10ms',
};
53 changes: 0 additions & 53 deletions newrelic.cjs

This file was deleted.

Loading

0 comments on commit 5e62621

Please sign in to comment.