Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
bienzaaron committed Nov 26, 2023
1 parent 1fed26f commit 42ecc56
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,14 +402,14 @@ const counter = new client.Counter({
name: 'metric_name',
help: 'metric_help',
labels: ['method', 'endpoint', 'protocol'],
defaultLabels: {
protocol: 'https',
},
defaultLabels: {
protocol: 'https',
},
});

// will be recorded with method: "GET", endpoint: "/test", protocol: "https"
counter.labels({method: 'GET', endpoint: '/test' }).inc();
counter.inc({method: 'GET', endpoint: '/test' });
counter.labels({ method: 'GET', endpoint: '/test' }).inc();
counter.inc({ method: 'GET', endpoint: '/test' });
```

Default values can also be overridden when recording a value:
Expand All @@ -418,16 +418,18 @@ Default values can also be overridden when recording a value:
// the following are all equivalent:
counter.labels('GET', '/test', 'http').inc();

counter.labels({
method: 'GET',
endpoint: '/test',
protocol: 'http'
}).inc();
counter
.labels({
method: 'GET',
endpoint: '/test',
protocol: 'http',
})
.inc();

counter.inc({
method: 'GET',
endpoint: '/test',
protocol: 'http'
method: 'GET',
endpoint: '/test',
protocol: 'http',
});
```

Expand Down

0 comments on commit 42ecc56

Please sign in to comment.