quarkus icon indicating copy to clipboard operation
quarkus copied to clipboard

Export security events as OTel Events

Open brunobat opened this issue 1 year ago • 6 comments

Description

Since Relates to https://github.com/quarkusio/quarkus/pull/37472 we have security related CDI events being generated.

This issue proposes to create a bridge made with a CDI observer that would listen to our internal events and create the OTel events... From there it's just OTel. We could also use a property to enable/disable the bridge.

Please note that OTel Events are experimental and most APM providers don't have yet support for them, however this is an excellent use to demo these events.

The proposal comes from a mailing list discussion with @sberyozkin, here: https://groups.google.com/g/quarkus-dev/c/XoTFEXnvPhk/m/4yfKp1a7AQAJ?utm_medium=email&utm_source=footer

brunobat avatar Jan 03 '24 17:01 brunobat

/cc @sberyozkin (security), @michalvavrik

quarkus-bot[bot] avatar Jan 03 '24 17:01 quarkus-bot[bot]

@sberyozkin, I think the bridge should live in the OTel extension. We should be able somehow to detect the classes generating these events, or we should be able to register/detect a capability when they are present. At build time we could activate the bridge.

brunobat avatar Jan 03 '24 17:01 brunobat

It can live in OTel extension, including runtime Security SPI (that contains event interface) to OTel will do no harm (that's how we do it in other extensions where security is optional). This looks interesting, I can't look this month for various reasons, but unless you will not implement it, I'll take care of it in the next one. Thanks for suggestion.

michalvavrik avatar Jan 03 '24 18:01 michalvavrik

OTel events and logs are currently not supported. From https://groups.google.com/g/quarkus-dev/c/uVg9BmUTC4o I know there will be work on logs. These two are related from what I can read https://opentelemetry.io/docs/specs/otel/logs/event-api/. @brunobat before I go ahead with this one, I suppose support for events must be added. How do I fit into this? Are you going to implement events anytime soon? I can have a look, but I don't want to collide with existing efforts (https://groups.google.com/g/quarkus-dev/c/uVg9BmUTC4o/m/jrZCG9ijAQAJ)

michalvavrik avatar Feb 14 '24 12:02 michalvavrik

Events can also be added to current spans. Will that work?

brunobat avatar Feb 14 '24 19:02 brunobat

Events can also be added to current spans. Will that work?

Will explore that. thank you.

michalvavrik avatar Feb 14 '24 19:02 michalvavrik