Skip to content

Conversation

@danschultzer
Copy link
Contributor

@danschultzer danschultzer commented Dec 15, 2024

Stacked on #435 which needs to get in first. Check the latest commit for the changes here.

Follows the guideslines set out in https://github.com/open-telemetry/semantic-conventions/blob/v1.27.0/docs/messaging/messaging-spans.md#destinations

This does introduce a bunch of breaking changes so let me know if backwards compability is required. I can keep the old attributes, but not sure if we should just go with major release instead since there's a lot of things that are different now? Same question as in #430

Changes

  • messaging.destination -> messaging.consumer.group.name
  • messaging.destination.kind is removed
  • Span names {destination} {operation} changed to{operation} {destination}
  • Span names {plugin} process changed to oban.plugin {plugin}
  • Span names Oban bulk insert changed to {operation} or {operation} {destination} depending whether all are the same job type

Added

  • messaging.destination.name (the worker module)
  • messaging.operation.name
  • messaging.operation.type
  • messaging.message.id

There's also more to this to get it to be compliant with 1.27 conventions. A larger one is that we probably need to deal with creation context? https://github.com/open-telemetry/semantic-conventions/blob/v1.27.0/docs/messaging/messaging-spans.md#context-propagation


Related #367

@danschultzer danschultzer changed the title USe v1.27 semantics for OpentelemetryOban Use v1.27 semantics for OpentelemetryOban Dec 15, 2024
@danschultzer danschultzer changed the title Use v1.27 semantics for OpentelemetryOban Switch to v1.27 semantics for OpentelemetryOban Dec 15, 2024
danschultzer referenced this pull request in getsentry/sentry-elixir Dec 18, 2024
- Use the worker name as the description and transaction name instead of "{worker} process"
- Use "queue.process" as the op - this is according to the docs https://develop.sentry.dev/sdk/telemetry/traces/modules/queues/

Maybe this could be improved in the opentelemetry_oban package?
@danschultzer danschultzer force-pushed the update-oban-attributes branch 2 times, most recently from 81ac160 to 191b5e9 Compare January 9, 2025 00:20
@danschultzer danschultzer force-pushed the update-oban-attributes branch from 191b5e9 to 8d6a9ad Compare January 9, 2025 00:22
@danschultzer danschultzer changed the title Switch to v1.27 semantics for OpentelemetryOban Conform attributes to v1.27 semantics for OpentelemetryOban Jan 9, 2025
@esambo
Copy link

esambo commented Jan 31, 2025

Any updates on this one?

@epinault
Copy link
Contributor

@danschultzer Hello! need any helps with this? how do we this move forward?

@danschultzer
Copy link
Contributor Author

I don’t think there’s anything you can do @epinault. I’ve been waiting since December for my PRs to be reviewed, but this repo is in low maintenance mode with only one of my PR’s reviewed and merged so far. I doubt this will be reviewed anytime soon. I understand that these PR’s may require considerable time by @bryannaegele and @tsloughter to be addressed, but I’m at a point where I’ll have to fork and release alternative hex package to unblock development at work. I can ping here once rubber meet the road, probably a week or two out.

@bryannaegele
Copy link
Contributor

Hey, folks. Just want to clear up that Tristan and I are not the codeowners of all of these libraries. We do not have the time or expertise to do everything. Please feel free to ping the codeowners for respective libraries for assistance. If you want to become an approver, see the contributing guidelines to familiarize yourself with the process.

If the codeowner is unresponsive and you want to take ownership, we can discuss that, but let's start with them.

@epinault
Copy link
Contributor

@andrewhr are you still part of the otel project? @indrekj do you need help with maintainers?

@dustinfarris
Copy link

Hi @indrekj could you take a look at this PR?

Copy link
Contributor

@indrekj indrekj left a comment

Choose a reason for hiding this comment

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

Hey. Sorry, I'm not really active contributing to opentelemetry any more. I probably should remove myself from the maintainers.

I did go over the PR and it seems to make sense to me. But again, I haven't worked on it quite a while.

@tsloughter
Copy link
Member

@indrekj thanks for going over the PR anyway. That'd be great if we could keep the maintainers list up to date with those actively working on the applications.

@dustinfarris
Copy link

@danschultzer can this be marked ready for review?

@tsloughter
Copy link
Member

Wow, lots of open Oban PRs. We need someone to really maintain the Oban instrumentation library. I am not familiar with either Oban or the messaging semantic conventions so would prefer not to. I don't know if @bryannaegele is even familiar with Oban but seemed to be taking up the work anyway.

It'd be great to find someone familiar with Oban who would want to become familiar with the semconv and take on getting this PRs either feedback, merged or closed.

@Miradorn
Copy link

Miradorn commented Jun 2, 2025

FWIW: Not an expert on the otel semantic conventions, but as a user of Oban and OpenTelemetry instrumentation, this looks good to me!

@solnic
Copy link

solnic commented Jun 30, 2025

Hey folks, we recently added support for OpenTelemetry to the Sentry Elixir SDK and now we'd love to get proper Oban support too. Is there anything we can do to help get this merged and released? 🙂

@tsloughter
Copy link
Member

@solnic really we need someone to step up as a codeowner to feel confident in merging that they reviewed it fully (not just the code but that it matches the semconv too) since they'll be responsible for reviewing/releasing fixes :).

It is also a draft and has conflicts. So whoever picks it up needs to open a new PR.

I may do the full semconv compare myself since it is getting so many requests for merger but then I can't fix the conflicts and open the PR as I wouldn't be able to +1 it for merger.

Copy link
Contributor

@grzuy grzuy left a comment

Choose a reason for hiding this comment

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

@danschultzer thanks for working on this!

Trying to provide my 2cents to help with some oban progress.

[
event(
name: "exception",
name: :exception,
Copy link
Contributor

Choose a reason for hiding this comment

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

This was already fixed separately in #558

[
event(
name: "exception",
name: :exception,
Copy link
Contributor

Choose a reason for hiding this comment

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

This was already fixed separately in #558

[
event(
name: "exception",
name: :exception,
Copy link
Contributor

Choose a reason for hiding this comment

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

This was already fixed separately in #558.

[
event(
name: "exception",
name: :exception,
Copy link
Contributor

Choose a reason for hiding this comment

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

This was already fixed separately in #558.

[
{:oban, "~> 2.0"},
{:opentelemetry_api, "~> 1.2"},
{:opentelemetry_api, "~> 1.4"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a need to further restrict the opentelemetry_api version requirement as part of this?

{:opentelemetry_semantic_conventions, "~> 0.2"},
{:opentelemetry, "~> 1.0", only: [:test]},
{:opentelemetry_semantic_conventions, "~> 1.27"},
{:opentelemetry, "~> 1.4", only: [:test]},
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a need to further restrict the opentelemetry version requirement as part of this?

"messaging.destination.name": "TestJob",
"messaging.consumer.group.name": "events",
"messaging.operation.name": :send,
"messaging.operation.type": :publish,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think messaging.operation.type needs to be either send or create in this case?

Image

source: https://opentelemetry.io/docs/specs/semconv/registry/attributes/messaging/#general-messaging-attributes

"messaging.system": :oban,
"messaging.destination.name": "TestJob",
"messaging.consumer.group.name": "events",
"messaging.operation.name": :send,
Copy link
Contributor

Choose a reason for hiding this comment

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

"messaging.destination_kind": :queue,
"messaging.system": :oban,
"messaging.destination.name": "TestJob",
"messaging.consumer.group.name": "events",
Copy link
Contributor

Choose a reason for hiding this comment

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

So this means we're making the interpretation that for the latest "Semantic conventions for messaging spans"

Consumer group => Oban queue
Destination => Oban Worker

right?

Copy link
Contributor

@grzuy grzuy Nov 6, 2025

Choose a reason for hiding this comment

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

For what is worth, this other pull request (https://github.com/open-telemetry/opentelemetry-erlang-contrib/pull/528/files#r2500483804) seems to be taking a different approach and keeping the interpretation of "Destination" as the oban queue, like it is right now.

And setting the Oban Worker module atom as the messaging.client.id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants