Skip to content

Improve Email Observability #5985

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

Open
famaridon opened this issue Feb 28, 2025 · 5 comments · May be fixed by #5997
Open

Improve Email Observability #5985

famaridon opened this issue Feb 28, 2025 · 5 comments · May be fixed by #5997
Labels
enhancement A general enhancement help wanted An issue that a contributor can help us with instrumentation An issue that is related to instrumenting a component
Milestone

Comments

@famaridon
Copy link

Description:

Hello,

I am currently using Spring Boot with Micrometer to monitor my application. While most monitoring features work well, I've noticed that email monitoring is not yet supported.

I propose implementing email monitoring similar to how JMS monitoring was implemented. This would provide a more comprehensive monitoring solution for applications that rely on email notifications.

Rationale:

As discussed with the Spring team in this GitHub issue spring-projects/spring-framework/issues/34496, it appears that this feature should be part of Micrometer rather than the Spring Framework.

Thank you for considering this request.

@marcingrzejszczak marcingrzejszczak added enhancement A general enhancement and removed waiting-for-triage labels Feb 28, 2025
@shakuzen shakuzen added this to the 1.x milestone Mar 3, 2025
@shakuzen shakuzen added help wanted An issue that a contributor can help us with instrumentation An issue that is related to instrumenting a component labels Mar 3, 2025
@shakuzen
Copy link
Member

shakuzen commented Mar 3, 2025

Thanks for opening the issue. I think we could have something for this, but it's been a long time since I've used the relevant API, so I don't know immediately what instrumentation would make sense. Would you be interested in putting together a pull request for this?

@famaridon
Copy link
Author

Great, I'll work on it this week.

@famaridon
Copy link
Author

Hi,

I'm scared to discover that jakarta.mail.Session is a final class and jakarta.mail.Transport is a class. So, I can't use JDKProxy to do the job.

I'm looking for another way to do it. I'm still working on it.

@famaridon
Copy link
Author

I believe I can use the Jakarta Mail feature to define a Transport provider. For more details, you can refer to the Jakarta Mail Specification.

Micrometer I can offer a micrometer:smtp://host protocol that enhances the standard SMTP protocol (and the SSL).

However, I'm uncertain about how to obtain the MeterRegistry and ObservationRegistry (SPI provider, Static reference, ...), and how to configure the Convention.

Do you have any suggestions or ideas on how to achieve this?

famaridon added a commit to famaridon/micrometer that referenced this issue Mar 4, 2025
famaridon added a commit to famaridon/micrometer that referenced this issue Mar 4, 2025
@famaridon famaridon linked a pull request Mar 4, 2025 that will close this issue
@jonatan-ivanov
Copy link
Member

However, I'm uncertain about how to obtain the MeterRegistry and ObservationRegistry (SPI provider, Static reference, ...), and how to configure the Convention.
Do you have any suggestions or ideas on how to achieve this?

Can you inject them through a constructor? Here's a demo example: ObservedTeaService

famaridon added a commit to famaridon/micrometer that referenced this issue Mar 18, 2025
famaridon added a commit to famaridon/micrometer that referenced this issue Mar 18, 2025
famaridon added a commit to famaridon/micrometer that referenced this issue Mar 20, 2025
shakuzen pushed a commit to famaridon/micrometer that referenced this issue Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement help wanted An issue that a contributor can help us with instrumentation An issue that is related to instrumenting a component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants