Skip to content

Commit

Permalink
Add parent Observation to the toString() of Observation.Context
Browse files Browse the repository at this point in the history
fixes gh-3542
  • Loading branch information
jonatan-ivanov committed Nov 23, 2022
1 parent 17ab6b5 commit 4647bf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,8 @@ public KeyValues getAllKeyValues() {
public String toString() {
return "name='" + name + '\'' + ", contextualName='" + contextualName + '\'' + ", error='" + error + '\''
+ ", lowCardinalityKeyValues=" + toString(getLowCardinalityKeyValues())
+ ", highCardinalityKeyValues=" + toString(getHighCardinalityKeyValues()) + ", map="
+ toString(map);
+ ", highCardinalityKeyValues=" + toString(getHighCardinalityKeyValues()) + ", map=" + toString(map)
+ ", parentObservation=" + parentObservation;
}

private String toString(KeyValues keyValues) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
class ObservationTextPublisherTests {

private static final String CONTEXT_TOSTRING = "name='testName', contextualName='testContextualName', error='java.io.IOException: simulated', lowCardinalityKeyValues=[lcTag='foo'], highCardinalityKeyValues=[hcTag='bar'], map=[contextKey='contextValue']";
private static final String CONTEXT_TOSTRING = "name='testName', contextualName='testContextualName', error='java.io.IOException: simulated', lowCardinalityKeyValues=[lcTag='foo'], highCardinalityKeyValues=[hcTag='bar'], map=[contextKey='contextValue'], parentObservation=null";

private final TestConsumer consumer = new TestConsumer();

Expand Down

0 comments on commit 4647bf2

Please sign in to comment.