Skip to content

Commit

Permalink
hotfix for metric label issue for Oracle operations (#20)
Browse files Browse the repository at this point in the history
- Updated metric initialise for each of the Oracle operations to include the "fsp" label.

This resolves the following error -> `2019-05-22T08:49:10.137Z - error: Added label "fsp" is not included in initial labelset: [ 'success', 'operation', 'source', 'destination' ]`

Maintenance update:
- Added Rajiv to maintainer list
  • Loading branch information
mdebarros authored May 22, 2019
1 parent 87d6a17 commit 5827317
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "sims",
"version": "6.2.1",
"version": "6.2.2",
"description": "A super-simple fsp simulator",
"main": "src/index.js",
"author": "ModusBox",
"contributors": [
"Georgi Georgiev <georgi.georgiev@modusbox.com>",
"Miguel de Barros <miguel.debarros@modusbox.com>",
"Murthy Kakarlamudi <murthy@modusbox.com>"
"Murthy Kakarlamudi <murthy@modusbox.com>",
"Rajiv Mothilal <rajiv.mothilal@modusbox.com>"
],
"repository": {
"type": "git",
Expand Down
14 changes: 7 additions & 7 deletions src/oracle/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ exports.createParticipantsByTypeAndId = function (request, h) {
const histTimerEnd = Metrics.getHistogram(
'sim_request',
'Histogram for Simulator http operations',
['success', 'operation', 'source', 'destination']
['success', 'fsp', 'operation', 'source', 'destination']
).startTimer()
Logger.debug(`createParticipantByTypeId::ID=${request.params.ID} payload=${request.payload}`)
addNewRequest(request)
Expand Down Expand Up @@ -69,7 +69,7 @@ exports.getParticipantsByTypeId = function (request, h) {
const histTimerEnd = Metrics.getHistogram(
'sim_request',
'Histogram for Simulator http operations',
['success', 'operation', 'source', 'destination']
['success', 'fsp', 'operation', 'source', 'destination']
).startTimer()
Logger.debug(`getParticipantsByTypeId::ID=${request.params.ID}`)
addNewRequest(request)
Expand All @@ -93,7 +93,7 @@ exports.updateParticipantsByTypeId = function (request, h) {
const histTimerEnd = Metrics.getHistogram(
'sim_request',
'Histogram for Simulator http operations',
['success', 'operation', 'source', 'destination']
['success', 'fsp', 'operation', 'source', 'destination']
).startTimer()
Logger.debug(`updateParticipantByTypeId::ID=${request.params.ID} payload=${request.payload}`)
addNewRequest(request)
Expand Down Expand Up @@ -127,7 +127,7 @@ exports.delParticipantsByTypeId = function (request, h) {
const histTimerEnd = Metrics.getHistogram(
'sim_request',
'Histogram for Simulator http operations',
['success', 'operation', 'source', 'destination']
['success', 'fsp', 'operation', 'source', 'destination']
).startTimer()
Logger.debug(`delParticipantsByTypeId::ID=${request.params.ID}`)
addNewRequest(request)
Expand Down Expand Up @@ -156,7 +156,7 @@ exports.createParticipantsBatch = function (request, h) {
const histTimerEnd = Metrics.getHistogram(
'sim_request',
'Histogram for Simulator http operations',
['success', 'operation', 'source', 'destination']
['success', 'fsp', 'operation', 'source', 'destination']
).startTimer()
let responseObject = {
partyList: []
Expand Down Expand Up @@ -224,7 +224,7 @@ exports.getRequestByTypeId = function (request, h) {
const histTimerEnd = Metrics.getHistogram(
'sim_request',
'Histogram for Simulator http operations',
['success', 'operation', 'source', 'destination']
['success', 'fsp', 'operation', 'source', 'destination']
).startTimer()
const responseData = requestsCache.get(request.params.ID)
requestsCache.del(request.params.ID)
Expand All @@ -236,7 +236,7 @@ exports.getRequestById = function (request, h) {
const histTimerEnd = Metrics.getHistogram(
'sim_request',
'Histogram for Simulator http operations',
['success', 'operation', 'source', 'destination']
['success', 'fsp', 'operation', 'source', 'destination']
).startTimer()
const responseData = batchRequestCache.get(request.params.requestId)
requestsCache.del(request.params.requestId)
Expand Down

0 comments on commit 5827317

Please sign in to comment.