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

API adjustments needed #17

Open
io7m opened this issue Aug 2, 2024 · 2 comments
Open

API adjustments needed #17

io7m opened this issue Aug 2, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@io7m
Copy link
Member

io7m commented Aug 2, 2024

The current design suffers from a couple of problems:

  1. Step resolution errors aren't structured errors. The API was designed before seltzer existed.
  2. The way nested tasks were implemented results in a less than great appearance when the task is rendered as a tree. Specifically, every task begins with a step that has the same name as the task. These names should be given separately.

Task recorders should gain an API to set attributes on the current step, for structured errors.

@io7m io7m added the enhancement New feature or request label Aug 2, 2024
@io7m io7m self-assigned this Aug 2, 2024
@io7m
Copy link
Member Author

io7m commented Aug 2, 2024

Additionally, task recorders could/should be AutoCloseable.

Turns out they already are, but IDEA disabled the warning.

@io7m
Copy link
Member Author

io7m commented Aug 2, 2024

What bothers me is that this is now so close to the OpenTelemetry tracer API. Both APIs capture:

  • Spans (Tasks/Subtasks in taskrecorder terms)
  • Events (Steps in taskrecorder terms)
  • Attributes (The same in both, although OpenTelemetry attributes are typed)

I wonder if the entire taskrecorder library could be a custom implementation of the Tracer API...

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

No branches or pull requests

1 participant