Skip to content

Commit

Permalink
fix(publish-metrics): use path.join to append path to endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
InesNi committed Sep 12, 2023
1 parent a77a3e9 commit ccf6229
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const got = require('got');
const debug = require('debug')('plugin:publish-metrics:dynatrace');
const path = require('path');

class DynatraceReporter {
constructor(config, events, script) {
Expand Down Expand Up @@ -44,14 +45,12 @@ class DynatraceReporter {
}

this.ingestEventsEndpoint = new URL(
'/api/v2/events/ingest',
this.config.envUrl
path.join(this.config.envUrl, '/api/v2/events/ingest')
);
}

this.ingestMetricsEndpoint = new URL(
'/api/v2/metrics/ingest',
this.config.envUrl
path.join(this.config.envUrl, '/api/v2/metrics/ingest')
);

this.pendingRequests = 0;
Expand Down

0 comments on commit ccf6229

Please sign in to comment.