Skip to content

Commit

Permalink
bump cosmastech/statsd-client-adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmastech committed Jul 21, 2024
1 parent d9b1f6c commit c812544
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"require": {
"php": "^8.2",
"cosmastech/statsd-client-adapter": "^0.3",
"cosmastech/statsd-client-adapter": "^0.4",
"illuminate/support": "^10.0|^11.0",
"illuminate/contracts": "^10.0|^11.0"
},
Expand Down
4 changes: 3 additions & 1 deletion src/AdapterManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ public function setDefaultInstance($name)
*/
public function getInstanceConfig($name)
{
return $this->setDriverKeyInConfig($this->config->get("statsd-adapter.channels.{$name}"));
return $this->setDriverKeyInConfig(
$this->config->get("statsd-adapter.channels.{$name}")
);
}

/**
Expand Down
19 changes: 10 additions & 9 deletions src/Stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Cosmastech\LaravelStatsDAdapter;

use Illuminate\Support\Facades\Facade;
use UnitEnum;

/**
* @method static \Cosmastech\StatsDClientAdapter\Adapters\StatsDClientAdapter channel(string|null $name = null)
Expand All @@ -15,15 +16,15 @@
* @method static \Cosmastech\LaravelStatsDAdapter\AdapterManager forgetInstance(array|string|null $name = null)
* @method static void purge(string|null $name = null)
* @method static \Cosmastech\LaravelStatsDAdapter\AdapterManager extend(string $name, \Closure $callback)
* @method static void timing(string $stat, float $durationMs, float $sampleRate = 1, array $tags = [])
* @method static mixed time(callable $closure, string $stat, float $sampleRate = 1, array $tags = [])
* @method static void gauge(string $stat, float $value, float $sampleRate = 1, array $tags = [])
* @method static void histogram(string $stat, float $value, float $sampleRate = 1, array $tags = [])
* @method static void distribution(string $stat, float $value, float $sampleRate = 1, array $tags = [])
* @method static void set(string $stat, float|string $value, float $sampleRate = 1, array $tags = [])
* @method static void increment(array|string $stats, float $sampleRate = 1, array $tags = [], int $value = 1)
* @method static void decrement(array|string $stats, float $sampleRate = 1, array $tags = [], int $value = 1)
* @method static void updateStats(array|string $stats, int $delta = 1, float $sampleRate = 1, array $tags = [])
* @method static void timing(string|UnitEnum $stat, float $durationMs, float $sampleRate = 1, array $tags = [])
* @method static mixed time(callable $closure, string|UnitEnum $stat, float $sampleRate = 1, array $tags = [])
* @method static void gauge(string|UnitEnum $stat, float $value, float $sampleRate = 1, array $tags = [])
* @method static void histogram(string|UnitEnum $stat, float $value, float $sampleRate = 1, array $tags = [])
* @method static void distribution(string|UnitEnum $stat, float $value, float $sampleRate = 1, array $tags = [])
* @method static void set(string|UnitEnum $stat, float|string $value, float $sampleRate = 1, array $tags = [])
* @method static void increment(string|UnitEnum|array $stats, float $sampleRate = 1, array $tags = [], int $value = 1)
* @method static void decrement(string|UnitEnum|array $stats, float $sampleRate = 1, array $tags = [], int $value = 1)
* @method static void updateStats(string|UnitEnum|array $stats, int $delta = 1, float $sampleRate = 1, array $tags = [])
* @method static mixed getClient()
*
* @see \Cosmastech\LaravelStatsDAdapter\AdapterManager
Expand Down
2 changes: 1 addition & 1 deletion src/StatsDAdapterServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function register(): void
*/
public function provides(): array
{
return [AdapterManager::class, StatsDClientAdapter::class];
return [AdapterManager::class, StatsDClientAdapter::class, InMemoryStatsRecord::class];
}

protected function offerPublishing(): void
Expand Down

0 comments on commit c812544

Please sign in to comment.