Skip to content

feat(Worker): Adds two otel span attributes when processJob is called #3199

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

runia1
Copy link
Contributor

@runia1 runia1 commented Apr 4, 2025

Why

This change isn't strictly necessary but adds two span attributes to the open telemetry tracing when a job is being processed. These additional pieces of metadata could be very helpful when troubleshooting issues.

How

I added the two span attributes I'd like see.

Additional Notes (Optional)

I don't have a good local setup to test this. The changes seem pretty straightforward, but I will lean on maintainers to validate.

@manast manast requested review from Copilot and roggervalf April 4, 2025 20:22
Copy link
Contributor

@manast manast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@@ -830,6 +830,8 @@ will never work with more accuracy than 1ms. */
[TelemetryAttributes.WorkerId]: this.id,
[TelemetryAttributes.WorkerName]: this.opts.name,
[TelemetryAttributes.JobId]: job.id,
[TelemetryAttributes.JobName]: job.name,
Copy link
Preview

Copilot AI Apr 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TelemetryAttributes.JobName is used in the Worker class but is not defined in the TelemetryAttributes enum. Consider adding a definition for JobName in src/enums/telemetry-attributes.ts.

Copilot uses AI. Check for mistakes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is actually, just not added in this PR though.

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

Successfully merging this pull request may close these issues.

2 participants