open-telemetry / open-telemetry/opentelemetry-java-instrumentation

Couldn't get Producer span in rocketmq SendMessageHook

Open
#10,817 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
2.6k
Forks
1.2k
Avg merge
2d 18h
Merged PRs (30d)
228

Description

Describe the bug

I want to add message body to Producer Span but Couldn't get Producer span in rocketmq SendMessageHook.

image

This seems to be the result of not calling Context.attch()

image

my code
image

Steps to reproduce

ignore

Expected behavior

ignore

Actual behavior

ignore

Javaagent or library instrumentation version

1.32.0

Environment

JDK: 1.8
OS: mac

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the RocketMQ SendMessageHook instrumentation and reviewing how the producer span and Context are handled around hook execution. The issue provides no reproducible steps or named tests; done would mean reproducing the missing producer span and verifying that message-body access works with the supported instrumentation version.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.