Skip to content

Commit 5d2da23

Browse files
author
nsahai8
committed
adding contructor for Object Id
1 parent 1a9ea9a commit 5d2da23

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

core/src/main/java/com/expedia/www/haystack/client/SpanContext.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ public SpanContext(UUID traceId, UUID spanId, UUID parentId, boolean extractedCo
6868
this.extractedContext = extractedContext;
6969
}
7070

71+
public SpanContext(Object traceId, Object spanId, Object parentId) {
72+
this(traceId, spanId, parentId, false);
73+
}
74+
7175
public SpanContext(Object traceId, Object spanId, Object parentId, boolean extractedContext) {
7276
this(traceId, spanId, parentId, Collections.emptyMap(), extractedContext);
7377
}
@@ -120,7 +124,7 @@ public String getBaggageItem(String key) {
120124
/**
121125
* @return the traceId
122126
*/
123-
public Object getTraceId() {//check whether we use these function outside our project
127+
public Object getTraceId() {
124128
return traceId;
125129
}
126130

@@ -129,14 +133,14 @@ public Object getTraceId() {//check whether we use these function outside our pr
129133
*/
130134
public Object getSpanId() {
131135
return spanId;
132-
}//check whether we use these function outside our project
136+
}
133137

134138
/**
135139
* @return the parentId
136140
*/
137141
public Object getParentId() {
138142
return parentId;
139-
}//check whether we use these function outside our project
143+
}
140144

141145
boolean isExtractedContext() {
142146
return extractedContext;

0 commit comments

Comments
 (0)