Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit 4dcda53

Browse files
author
Nikolaos Veneti
committed
api.segment.io
1 parent 9c49672 commit 4dcda53

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/metrics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function Metrics(options) {
2020
Metrics.prototype.options = function(options) {
2121
options = options || {};
2222

23-
this.host = options.host || 'api.segment.io/v1';
23+
this.host = options.host || 'api.dreamdata.cloud/v1';
2424
this.sampleRate = options.sampleRate || 0; // disable metrics by default.
2525
this.flushTimer = options.flushTimer || 30 * 1000 /* 30s */;
2626
this.maxQueueSize = options.maxQueueSize || 20;

test/metrics.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('metrics', function() {
6060

6161
sinon.assert.calledOnce(spy);
6262
var req = spy.getCall(0).args[0];
63-
assert.strictEqual(req.url, 'https://api.segment.io/v1/m');
63+
assert.strictEqual(req.url, 'https://api.dreamdata.cloud/v1/m');
6464
assert.strictEqual(
6565
req.requestBody,
6666
'{"series":[{"type":"Counter","metric":"foo","value":1,"tags":{}}]}'
@@ -148,7 +148,7 @@ describe('metrics', function() {
148148
setTimeout(function() {
149149
sinon.assert.calledOnce(spy);
150150
var req = spy.getCall(0).args[0];
151-
assert.strictEqual(req.url, 'https://api.segment.io/v1/m');
151+
assert.strictEqual(req.url, 'https://api.dreamdata.cloud/v1/m');
152152
assert.strictEqual(
153153
req.requestBody,
154154
'{"series":[{"type":"Counter","metric":"test1","value":1,"tags":{"foo":"bar"}}]}'
@@ -165,7 +165,7 @@ describe('metrics', function() {
165165
it('should handle empty options correctly', function() {
166166
metrics.options({});
167167

168-
assert.equal(metrics.host, 'api.segment.io/v1');
168+
assert.equal(metrics.host, 'api.dreamdata.cloud/v1');
169169
assert.equal(metrics.sampleRate, 0);
170170
assert.equal(metrics.flushTimer, 30000);
171171
assert.equal(metrics.maxQueueSize, 20);
@@ -174,9 +174,9 @@ describe('metrics', function() {
174174
});
175175

176176
it('should respect host option', function() {
177-
metrics.options({ host: 'api.segment.com/v1' });
177+
metrics.options({ host: 'api.dreamdata.cloud/v1' });
178178

179-
assert.equal(metrics.host, 'api.segment.com/v1');
179+
assert.equal(metrics.host, 'api.dreamdata.cloud/v1');
180180
});
181181

182182
it('should respect sampleRate option', function() {

0 commit comments

Comments
 (0)