Skip to content

Commit 1e8538f

Browse files
ReceiverContext was missing a remoteServiceName
1 parent dfdc721 commit 1e8538f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

micrometer-observation/src/main/java/io/micrometer/observation/transport/ReceiverContext.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public class ReceiverContext<C> extends Observation.Context {
3636

3737
private C carrier;
3838

39+
@Nullable
40+
private String remoteServiceName;
41+
3942
/**
4043
* Creates a new instance of {@link ReceiverContext}.
4144
* @param getter propagator getter
@@ -70,4 +73,21 @@ public Kind getKind() {
7073
return kind;
7174
}
7275

76+
/**
77+
* Return optional name for the service from which the message is polled.
78+
* @return optional name for the service from which the message is polled
79+
*/
80+
@Nullable
81+
public String getRemoteServiceName() {
82+
return remoteServiceName;
83+
}
84+
85+
/**
86+
* Set optional name for the service from which the message is polled.
87+
* @param remoteServiceName name of the service from which the message is polled
88+
*/
89+
public void setRemoteServiceName(@Nullable String remoteServiceName) {
90+
this.remoteServiceName = remoteServiceName;
91+
}
92+
7393
}

0 commit comments

Comments
 (0)