Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReceiverContext was missing a remoteServiceName #3419

Merged
merged 2 commits into from
Sep 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package io.micrometer.observation.transport;

import io.micrometer.common.lang.NonNull;
import io.micrometer.common.lang.Nullable;
import io.micrometer.observation.Observation;

import java.util.Objects;
Expand All @@ -36,6 +37,9 @@ public class ReceiverContext<C> extends Observation.Context {

private C carrier;

@Nullable
private String remoteServiceName;

/**
* Creates a new instance of {@link ReceiverContext}.
* @param getter propagator getter
Expand Down Expand Up @@ -70,4 +74,21 @@ public Kind getKind() {
return kind;
}

/**
* Return optional name for the service from which the message is polled.
* @return optional name for the service from which the message is polled
*/
@Nullable
public String getRemoteServiceName() {
return remoteServiceName;
}

/**
* Set optional name for the service from which the message is polled.
* @param remoteServiceName name of the service from which the message is polled
*/
public void setRemoteServiceName(@Nullable String remoteServiceName) {
this.remoteServiceName = remoteServiceName;
}

}