Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
breedx-splk committed Oct 13, 2023
1 parent ff52535 commit 136a68b
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ private SpanData modify(SpanData original) {
}

// Convert new net semconv to old
modifiedAttributes = downgradeNetworkAttrNames(original.getAttributes(), modifiedAttributes);
modifiedAttributes =
downgradeNetworkAttrNames(original.getAttributes(), modifiedAttributes);

// zipkin eats the event attributes that are recorded by default, so we need to convert
// the exception event to span attributes
Expand Down Expand Up @@ -145,8 +146,8 @@ private SpanData modify(SpanData original) {
}

// At least until we can leverage the new names...
private AttributesBuilder downgradeNetworkAttrNames(Attributes originalAttributes,
AttributesBuilder attributes) {
private AttributesBuilder downgradeNetworkAttrNames(
Attributes originalAttributes, AttributesBuilder attributes) {
return AttributeReplacer.with(originalAttributes, attributes)
.update(NETWORK_CONNECTION_TYPE, NET_HOST_CONNECTION_TYPE)
.update(NETWORK_CONNECTION_SUBTYPE, NET_HOST_CONNECTION_SUBTYPE)
Expand Down Expand Up @@ -272,16 +273,16 @@ private AttributeReplacer(Attributes original, AttributesBuilder attributes) {
this.attributes = attributes;
}

<T> AttributeReplacer update(AttributeKey<T> currentName, AttributeKey<T> replacementName){
<T> AttributeReplacer update(AttributeKey<T> currentName, AttributeKey<T> replacementName) {
T value = original.get(currentName);
if(value != null){
if (value != null) {
attributes.remove(currentName);
attributes.put(replacementName, value);
}
return this;
}

AttributesBuilder finish(){
AttributesBuilder finish() {
return attributes;
}
}
Expand Down

0 comments on commit 136a68b

Please sign in to comment.