-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out MessagingAttributesGetter (#5626)
- Loading branch information
Mateusz Rzeszutek
authored
Mar 18, 2022
1 parent
a1e45a5
commit f0bdce9
Showing
34 changed files
with
738 additions
and
777 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...o/opentelemetry/instrumentation/api/instrumenter/messaging/MessagingAttributesGetter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.api.instrumenter.messaging; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* An interface for getting messaging attributes. | ||
* | ||
* <p>Instrumentation authors will create implementations of this interface for their specific | ||
* library/framework. It will be used by the {@link MessagingAttributesExtractor} to obtain the | ||
* various messaging attributes in a type-generic way. | ||
*/ | ||
public interface MessagingAttributesGetter<REQUEST, RESPONSE> { | ||
|
||
@Nullable | ||
String system(REQUEST request); | ||
|
||
@Nullable | ||
String destinationKind(REQUEST request); | ||
|
||
@Nullable | ||
String destination(REQUEST request); | ||
|
||
boolean temporaryDestination(REQUEST request); | ||
|
||
@Nullable | ||
String protocol(REQUEST request); | ||
|
||
@Nullable | ||
String protocolVersion(REQUEST request); | ||
|
||
@Nullable | ||
String url(REQUEST request); | ||
|
||
@Nullable | ||
String conversationId(REQUEST request); | ||
|
||
@Nullable | ||
Long messagePayloadSize(REQUEST request); | ||
|
||
@Nullable | ||
Long messagePayloadCompressedSize(REQUEST request); | ||
|
||
@Nullable | ||
String messageId(REQUEST request, @Nullable RESPONSE response); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.