Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
backloged atm
Browse files Browse the repository at this point in the history
  • Loading branch information
philkra committed Sep 5, 2019
1 parent ebaea91 commit 7e70d49
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Events/DefaultEventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function newSpan(string $name, EventBean $parent): Span
/**
* {@inheritdoc}
*/
public function newMetricset($set, $tags): Metricset
public function newMetricset(array $set, array $tags = []): Metricset
{
return new Metricset($set, $tags);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Events/EventFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ public function newSpan(string $name, EventBean $parent): Span;
*
* @return Metricset
*/
public function newMetricset($set, $tags): Metricset;
public function newMetricset(array $set, array $tags = []): Metricset;

}
3 changes: 2 additions & 1 deletion src/Events/Metricset.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Metricset extends EventBean implements \JsonSerializable
* @param array $set
* @param array $tags
*/
public function __construct(array $set, array $tags)
public function __construct(array $set, array $tags = [])
{
parent::__construct([]);
foreach($set as $k => $v) {
Expand All @@ -47,6 +47,7 @@ public function jsonSerialize() : array
return [
'metricset' => [
'samples' => $this->samples,
// 'tags' => $this->tags,
'timestamp' => $this->getTimestamp(),
]
];
Expand Down

0 comments on commit 7e70d49

Please sign in to comment.