Skip to content

Commit

Permalink
fix: invalid namespace when using prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
simonecorsi committed Jan 31, 2023
1 parent 201c0ad commit 517309f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dats-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const options: Options = {
prefix: {
type: 'string',
help: 'Metric prefix',
default: '',
},
namespace: {
type: 'string',
Expand Down Expand Up @@ -121,7 +120,7 @@ if (!validate(configurations, options)) {
const { host, port, type, value, prefix, namespace, dryRun, quiet } =
configurations;

const ns = `${prefix}.${namespace}`;
const ns = [prefix, namespace].filter(Boolean).join('.');

const client = new Client({
host: new URL(`udp://${host}:${port}`),
Expand Down

0 comments on commit 517309f

Please sign in to comment.