Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
fix: change default APM server_url to 'http://127.0.0.1:8200' to avoi…
Browse files Browse the repository at this point in the history
…d IPv6 ambiguity

The APM agent won't *require* this change, because in the referenced
change it will be adding the same default on its end.

Refs: elastic/apm-agent-nodejs#3049
  • Loading branch information
trentm committed Nov 28, 2022
1 parent 6988a5c commit 04de000
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Client.prototype.config = function (opts) {
if (!this._conf.size && this._conf.size !== 0) this._conf.size = 750 * 1024
if (!this._conf.time && this._conf.time !== 0) this._conf.time = 10000
if (!this._conf.serverTimeout && this._conf.serverTimeout !== 0) this._conf.serverTimeout = 15000
if (!this._conf.serverUrl) this._conf.serverUrl = 'http://localhost:8200'
if (!this._conf.serverUrl) this._conf.serverUrl = 'http://127.0.0.1:8200'
if (!this._conf.hostname) this._conf.hostname = hostname
if (!this._conf.environment) this._conf.environment = process.env.NODE_ENV || 'development'
if (!this._conf.truncateKeywordsAt) this._conf.truncateKeywordsAt = 1024
Expand Down Expand Up @@ -987,7 +987,7 @@ function getChoppedStreamHandler (client, onerror) {
//
// The HTTP keep-alive agent will unref sockets when unused, and ref them
// during a request. Given that the normal makeIntakeRequest behaviour
// is to keep a request open for up to 10s (`apiRequestTimeout`), we must
// is to keep a request open for up to 10s (`apiRequestTime`), we must
// manually unref the socket.
//
// The exception is when in a Lambda environment, where we *do* want to
Expand Down

0 comments on commit 04de000

Please sign in to comment.