Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init basic version #2

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open

Init basic version #2

wants to merge 15 commits into from

Conversation

tahrz
Copy link

@tahrz tahrz commented Nov 7, 2024

This PR introduces the initial version of the decoration for the official Symfony OpenTelemetry Client Bundle. The bundle simplifies the integration and configuration of telemetry collection via a list of Kernel listeners.

- name: Install dependencies
run: composer install --ignore-platform-req=ext-opentelemetry

- name: Run PHPUnit tests

Choose a reason for hiding this comment

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

не вистачає ще степу зі збором coverage і відправкою репорта в codecov
https://github.com/MacPaw/behat-messenger-context/blob/develop/.github/workflows/ci.yaml#L72

## Setup bundle

## Kernel event listeners
Example of kernel event listener implementation can be found in `Macpaw\SymfonyOtelBundle\Span\ExecutionTimeSpanTracer` class.

Choose a reason for hiding this comment

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

з опису не зрозуміло як це використовувати, було б непогано накидати екземплів

$listeners = $container->getParameter('otel_bundle.span_tracers');

foreach ($listeners as $listener) {
$definition = $container->register($listener['class'], $listener['class']);
Copy link

@serhiidonii serhiidonii Nov 7, 2024

Choose a reason for hiding this comment

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

$definition = new Definition($listener['class']);

or

$definition = $container->hasDefinition($listener['class']) ? $container->getDefinition($listener['class']) : new Definition($listener['class']); 

composer.json Outdated
"php": "^8.2",
"ext-opentelemetry": "*",
"symfony/dependency-injection": "^6.4|^7.0",
"symfony/config": "^7.0",

Choose a reason for hiding this comment

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

^6.4|^7.0

composer.json Outdated
"ext-opentelemetry": "*",
"symfony/dependency-injection": "^6.4|^7.0",
"symfony/config": "^7.0",
"symfony/yaml": "^7.0",

Choose a reason for hiding this comment

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

^6.4|^7.0

composer.json Outdated
"symfony/config": "^7.0",
"symfony/yaml": "^7.0",
"open-telemetry/symfony-sdk-bundle": "^0.0.25",
"symfony/http-client": "^7.0",

Choose a reason for hiding this comment

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

^6.4|^7.0

composer.json Outdated
"nyholm/psr7": "^1.8",
"guzzlehttp/promises": "^2.0",
"php-http/httplug": "^2.4",
"symfony/http-kernel": "^7.0"

Choose a reason for hiding this comment

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

^6.4|^7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants