No description
  • PHP 89%
  • Shell 11%
Find a file
Ryan Grippeling fa502c655a
All checks were successful
[Workflow] On Documentation Change / techdocs (push) Successful in 35s
[Workflow] On Documentation Change / Generate (push) Successful in 0s
[Workflow] On Documentation Change / Build (Zensical) + sync to Garage web (push) Successful in 15s
[Workflow] On Documentation Change / Deploy (docs site / Garage web) (push) Successful in 0s
feat(docs): publish to own docs-telemetry-service bucket (estate #2)
Repo-scoped Garage key via repo-level TECHDOCS_S3_* (shadows org). The
shared docs-site prefix stops receiving updates; the docs domain routes
/telemetry-service to the new bucket in homelab's phase C cutover.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-12 17:27:10 +02:00
.forgejo/workflows feat(docs): publish to own docs-telemetry-service bucket (estate #2) 2026-08-12 17:27:10 +02:00
.github ci: adopt Forgejo Actions CI (validated green) 2026-07-18 14:13:39 +02:00
docs/techdocs feat(docs): publish to docs.webgrip.dev/telemetry-service/ — estate rollout (ADR-0052) 2026-08-11 10:55:13 +02:00
src fix: Log a warning instead of an error when the collector is not configured 2025-05-27 10:28:48 +02:00
tests fix: Fixed test 2025-05-27 10:43:49 +02:00
.gitignore gitignore phpunit cache 2024-10-15 15:29:01 +02:00
.releaserc.cjs ci: retrigger release train (re-run scheduler wedge; composite now has yq + prune fix) 2026-07-26 11:16:08 +02:00
catalog-info.yml Added backstage stuff 2024-11-14 22:35:28 +01:00
CHANGELOG.md chore(release): 1.0.5 [skip ci] 2026-07-18 13:37:34 +00:00
composer.json fix: Removed version from composer.json due to warning issued here https://getcomposer.org/doc/04-schema.md#version 2025-02-27 00:28:19 +01:00
composer.lock Updates lock file 2025-02-27 00:34:19 +01:00
develop.sh Rector 2024-10-18 15:11:47 +02:00
phpcs.xml fix: Fixing phpcs issues and added files that should trigger releases 2025-02-26 23:16:27 +01:00
phpmd.xml Initial commit 2024-10-10 07:44:10 +02:00
phpstan.neon Initial commit 2024-10-10 07:44:10 +02:00
phpunit.xml.dist Made unittests work 2024-10-12 17:39:11 +02:00
psalm.xml more unittest stuff 2024-10-12 22:12:20 +02:00
README.md fix: Changelog 2025-02-27 00:15:19 +01:00
rector.php more unittest stuff 2024-10-12 22:12:20 +02:00
renovate.json Add renovate.json 2026-02-08 04:36:15 +00:00

semantic-release: angular

Prerequisites

  • PHP 8.2
  • Composer

How to use

Serviceprovider

TelemetryServiceProvider::class

Using TelemetryService to log

use \Webgrip\TelemetryService\Core\Domain\Services\TelemetryServiceInterface;

class Foo
{
    public function __construct(private TelemetryServiceInterface $telemetryService) {
    }
    
    public function bar()
    {
        $this->telemetryService->logger()->debug('Hello World');
        $this->telemetryService->logger()->info('Hello World');
        $this->telemetryService->logger()->warning('Hello World');
        // ... 
    }
}

Using TelemetryService to trace

use \Webgrip\TelemetryService\Core\Domain\Services\TelemetryServiceInterface;

class Foo
{
    public function __construct(private TelemetryServiceInterface $telemetryService) {
    }
    
    public function bar()
    {
        $tracer = $this->telemetryService->tracer();
        $span = $tracer->spanBuilder('foo')->startSpan();
        
        $span->addEvent('bar');
        $span->setAttributes(['foo' => 'bar']);
        $span->recordException(new \Exception('Hello World'));
        $span->addLink('foo', 'bar');
        // ... 
        
        $span->end();
    }
}

Using attributes

You can add the attribute 'Webgrip\TelemetryService\Core\Domain\Services\Traceable' to your class to automatically trace all methods of the class You can also use this attribute to trace a single method

#[\Webgrip\TelemetryService\Core\Domain\Attributes\Traceable]
class Foo
{
    public function bar()
    {
        // ...
    }
    
    #[\Webgrip\TelemetryService\Core\Domain\Attributes\Traceable]
    public function baz()
    {
        // ...
    }
}
// DI configuration
return [
    Foo::class => function (\DI\Container $container) {
        $factory = $container->get(\Webgrip\TelemetryService\Infrastructure\Factories\TracedClassFactory::class)
        $foo = new Foo();
        
        return $factory->create($foo);
    }
];