Skip to content

Commit

Permalink
added service and action to counter
Browse files Browse the repository at this point in the history
  • Loading branch information
orlyk-rollun committed Jun 18, 2021
1 parent 5a97943 commit 9e92e95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Megaplan/src/MegaplanClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ protected function sendPostRequest($uri, array $params = null)

$this->logger->notice('METRICS_COUNTER', [
PrometheusWriter::METRIC_ID => 'megaplan_requests',
PrometheusWriter::VALUE => 1
PrometheusWriter::VALUE => 1,
'service' => 'megaplan',
'action' => $uri
]);

if ($this->client->getInfo('http_code') === 429) {
Expand Down Expand Up @@ -259,7 +261,9 @@ protected function sendGetRequest($uri, array $params = null)

$this->logger->notice('METRICS_COUNTER', [
PrometheusWriter::METRIC_ID => 'megaplan_requests',
PrometheusWriter::VALUE => 1
PrometheusWriter::VALUE => 1,
'service' => 'megaplan',
'action' => $uri
]);

if ($this->client->getInfo('http_code') === 429) {
Expand Down

1 comment on commit 9e92e95

@orlyk-rollun
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.