Skip to content

Commit

Permalink
zipkin transport client setter and getter
Browse files Browse the repository at this point in the history
  • Loading branch information
nekufa committed Aug 24, 2021
1 parent d376d9b commit 8a5610b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Tracing/Transport/ZipkinTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,22 @@ public function __construct(
) {
}

public function getClient(): HttpClientInterface
{
return $this->client;
}

public function getUrl(): string
{
return sprintf('%s://%s:%s%s', $this->schema, $this->hostname, $this->port, $this->path);
}

public function setClient(HttpClientInterface $client): self
{
$this->client = $client;
return $this;
}

public function write(array $data): bool
{
$response = $this->client->request('POST', $this->getUrl(), [
Expand Down

0 comments on commit 8a5610b

Please sign in to comment.