Skip to content

Experiment: synthetic time-in-queue span for JMS - #2994

Closed
mcculls wants to merge 39 commits into
masterfrom
mcculls/syntheticQueueSpan
Closed

mcculls wants to merge 39 commits into
masterfrom
mcculls/syntheticQueueSpan

Conversation

@mcculls

@mcculls mcculls commented Aug 7, 2021

Copy link
Copy Markdown
Contributor

WIP

@mcculls mcculls added tag: do not merge Do not merge changes in-progress labels Aug 7, 2021
if (null != span) {
if (SPAN_KIND_BROKER.equals(span.getTag(SPAN_KIND))) {
if (null == brokerSpans) {
brokerSpans = new ArrayList<>();

@dougqh dougqh Aug 9, 2021 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we can extract some of this code to share between messaging libraries. Although, it might be premature to do so at this point.

I'm also still wondering if we should push the notion of span session into core.


private final String spanKind;
private final String spanType;
private final String serviceName;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the effectively static? If so, it would optimize better as a static final.

&& !Config.get().getJMSPropagationDisabledQueues().contains(destinationName))) {
propagate().inject(span, message, SETTER);
}
if (Config.get().isJMSPropagationEnabled()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally, I'd like to the Config bits into static finals, so they'll optimize better.
That's a new requirement, so I won't block the review based on that.

Maybe we wait until we do a bigger discussion around Config.

destinationName = ((Topic) destination).getTopicName();
}
} catch (final JMSException e) {
} catch (Exception ignored) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we have a way to report when an unexpected exception occurs?

I'm concerned that we might be burying exceptions and have no way to detect or debug it. If make that change, we'll have to take care about the performance.

.and(isPublic())
.and(takesArgument(0, named("javax.jms.Destination"))),
getClass().getName() + "$CreateConsumer");
if (!Config.get().isJmsLegacyTracingEnabled()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice. I'm wondering if a better pattern for handling configuration differences would be to have different variations of instrumentation methods.

@mcculls

mcculls commented Sep 6, 2021

Copy link
Copy Markdown
Contributor Author

replaced by #3054

@mcculls mcculls closed this Sep 6, 2021
@mcculls
mcculls deleted the mcculls/syntheticQueueSpan branch September 6, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tag: do not merge Do not merge changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants