symfony / symfony

The Symfony PHP framework
https://symfony.com
MIT License
29.8k stars 9.47k forks source link

[RFC] Observability component(s) #46225

Closed mateuszsip closed 1 year ago

mateuszsip commented 2 years ago

Description

Hi! I believe PHP ecosystem needs proper observability components and Symfony could be a driver to spread some awareness and expertise on that topic. This is a key part of microservices architecture and lack of proper tooling is painful in PHP apps.

The goal would be to implement metrics and tracing easier - to create some common abstraction for various services and standards and then easily integrate it into the Symfony app.

Initiatives like https://opentelemetry.io can help us to shape the ground up

What do you think about that? I couldn't find any dedicated discussion around it.

Example

No response

mesilov commented 2 years ago

great idea, i use Symfony HttpClient component and request tracing in the box will be great

BenjaminRbt commented 2 years ago

Please consider this repository: https://github.com/worldia/instrumentation-bundle

lyrixx commented 2 years ago

@mateuszsip Did you try https://github.com/worldia/instrumentation-bundle ?

maxbeckers commented 2 years ago

IMHO it souds to be a great idea to have a component/bundle in the symfony eco system with the functionallity. Having metrics (for Prometheus) of the application and sth like a health endpoint are features a couple of symfony applications will need stuff like that. The mentioned instrumentation-bundle seems to have a lot of functionallity for that. But i think monitoring becomes more important. From my POV it could be a great idea to add the functionallity. A bit like a lightweight "Spring Boot Actuator" in java.

alekitto commented 1 year ago

Hi there! If you are interested, there's a proposal for a Tracing PSR: https://github.com/php-fig/fig-standards/blob/master/proposed/tracing-meta.md

We are discussing it on the PHP-FIG discord, and here you can find the current state of the proposal. It will be interesting for us to have yours contribution too!

maxbeckers commented 1 year ago

Thanks for the hint @alekitto! Seems to be a good proposal for the system tracing.

But this RFC is not only about tracing: 01 More details about this topic here: https://peter.bourgon.org/blog/2017/02/21/metrics-tracing-and-logging.html this image is as well from the blogpost.

Tracing is only one part of the observability. Logging is implemented for now in the most systems. But tracing and monitoring becomes more popular.

But yes, it's always good to base it on a defined standard.

BenjaminRbt commented 1 year ago

Hello @maxbeckers ,

Please consider adding a background to uploaded images, in order to improve accessibility. My dark-themed Github interface does not comply with dark pictures, cf this screenshot:

image

Thank you!

carsonbot commented 1 year ago

Thank you for this suggestion. There has not been a lot of activity here for a while. Would you still like to see this feature?

carsonbot commented 1 year ago

Friendly reminder that this issue exists. If I don't hear anything I'll close this.

carsonbot commented 1 year ago

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!