open-telemetry / opentelemetry-android

OpenTelemetry Tooling for Android
Apache License 2.0
160 stars 41 forks source link

Make emitting custom events simple #573

Open breedx-splk opened 2 months ago

breedx-splk commented 2 months ago

Application developers using this library want a simple and straightforward means of generating custom events. Right now, it's only possible to create custom events by jumping through a series of incantation steps, something like:

SdkEventLoggerProvider.create(rum.openTelemetry.logsBridge)
  .get(scopeName)
  .builder(eventName)
  .put(bodyField1, value1)
  ...
  .emit()

I'd like to see events become a first-class API on the OpenTelemetryRum interface, something more like:

rum.emitEvent(eventName)

which would be shorthand for something like

rum.emitEvent(name = eventName, body = body, attributes = attributes)
RichardChukwu commented 1 month ago

Hello @breedx-splk are you still working on this?

breedx-splk commented 1 month ago

Hi @RichardChukwu, I'm not. There is a lot of activity in the Logging SIG right now around the event api, and it definitely seems like the existing event API in the java core repo will change....which is fine, because the API talked about in THIS issue will sit in front of whatever the core implementation ends up looking like. In other words, this will abstract it away even more for users.

Would you like to work on this?

RichardChukwu commented 1 month ago

I'd like to give it a try yeah. I'm an outreachy applicant and first time contributor to this repo @breedx-splk

breedx-splk commented 1 month ago

I'd like to give it a try yeah. I'm an outreachy applicant and first time contributor to this repo @breedx-splk

Ok, thanks for the transparency and for offering to help! I'll go ahead and assign this to you to work on. Please review the CONTRIBUTING.md guidance and ensure that you're doing your best to submit well-tested, clean code.