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

Oban.Telemetry docs don't reflect reality #916

Closed
eaguilera23 opened this issue Jul 4, 2023 · 3 comments
Closed

Oban.Telemetry docs don't reflect reality #916

eaguilera23 opened this issue Jul 4, 2023 · 3 comments
Labels
area:oss Related to Oban OSS closed:invalid This doens't seem right

Comments

@eaguilera23
Copy link

Precheck

Environment

  • Oban Version: 2.15.2
  • PostgreSQL Version: 14.8
  • Elixir & Erlang/OTP Versions (elixir --version): 1.12.3 - OTP 23

Current Behavior

When a telemetry event when a job starts, the following values are passed as metadata:

:args
:attempt
:conf
:id
:job
:max_attempts
:prefix
:queue
:tags
:worker

Expected Behavior

Based on the documentation, this is the expected metadata from a telemetry event when a job is started:

:conf, :job, :state
@sorentwo
Copy link
Member

sorentwo commented Jul 4, 2023

This is intentional.

The undocumented event fields are legacy, from before the entire job struct was passed to the event. Using those fields is deprecated, but they can't be removed without a 3.0 version bump because it's a breaking change.

@sorentwo sorentwo added area:oss Related to Oban OSS closed:invalid This doens't seem right labels Jul 4, 2023
@sorentwo sorentwo closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2023
@eaguilera23
Copy link
Author

But is it intentional that the state key is not present at the top level?

@sorentwo
Copy link
Member

sorentwo commented Jul 5, 2023

It's intentional that [:oban, :job, :start] lacks a state key because there isn't an execution state yet. But nicely spotted that shouldn't be listed in the telemetry documentation! Fixed with d91073b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:oss Related to Oban OSS closed:invalid This doens't seem right
Projects
None yet
Development

No branches or pull requests

2 participants