feat(kotel): support record offset in consume/produce spans#1343
Conversation
|
This PR lgtm - I had Claude dig into your 1.41 problem and came up with this proposal, wdyt? The problem, as you pointed out, is breaking name changes. Otel apparently has an answer for this in the spec (messaging semconv):
We can implement Semantics:
Proposal (let me know if you'd want to handle this in this PR or in a new PR): read |
Sounds pretty good. I suggest merging this MR so as not to hold adding context to the spans. And I'll bring a new MR this week that will implement the migration to the current version of otel semconv with OTEL_SEMCONV_STABILITY_OPT_IN support in it Do you think TODO comments should be left on the use of OTEL_SEMCONV_STABILITY_OPT_IN envs? I understand that they are supposed to be removed in the future along with the transition to the new major version. |
|
I investigated what a migration to a more recent version might look like, and it does not appear to be worthwhile at this stage. The main issue is that most of the attributes introduced after 1.18.0 are not yet stable and are still marked as Development. As a result, it is difficult to justify referring to one version as “old” and the other as “stable.” At the same time, such a migration would introduce a considerable amount of additional code without delivering meaningful benefits. At this point, the most reasonable approach seems to be to add the helpful attributes that already included in this MR, update the dependencies (optional), and remain on version 1.18.0 until the messaging convention reaches stable status. Once that happens, we can introduce the necessary opt-in mechanisms and proceed with the migration I have an example MR where I implemented the solution described above. Take a look please. You may have some additional thoughts or suggestions on this approach. |
|
@twmb hi, what do you think? |
|
Was delayed by a massive review of #1348... I'm happy with what you're suggesting and waiting for the attributes to be stable. |
|
Test failure is a bug in share fetch sessions (yayyyyy the #1348 audit missed things), I can merge this now. |
Yes, I saw that "monster". It is surprising that such a significant amount of changes only resulted in a patch version bump by 1 😅
Thank you |
|
Released as plugin/kotel/v1.7.0, thanks! |
Add record offset to Kafka consumer and producer spans. Useful information for debugging and investigation.
While working on this, I explored migrating kotel from semantic conventions v1.18.0 to v1.41.0. However, this migration introduces several naming and convention questions that require team alignment:
In v1.41.0 there is no longer a publish operation type (unlike in v1.18.0).
This affects how we should name spans and attributes going forward. Example of the possible new naming style: fork
I’d like feedback on whether we should proceed with the semconv upgrade as part of (or right after) this change. Happy to include it in this MR or handle it separately