Skip to content

Commit

Permalink
Merge pull request #65 from chanchiem/master
Browse files Browse the repository at this point in the history
Added clearer documentation to createSegment and createSubsegment #64
  • Loading branch information
chrisradek authored Feb 25, 2019
2 parents 0c2f5d3 + 8bc9d68 commit f893f6c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public <R> R createSegment(String name, Function<Segment, R> function) {
}

/**
* Begins a segment and passes it to the supplied consumer. Intercepts exceptions, adds them to the segment, and re-throws them.
* Begins a segment and passes it to the supplied consumer, and ends the segment before returning the consumer's result. Intercepts exceptions, adds them to the segment, and re-throws them.
*
* @param name
* the name to use for the created segment
Expand Down Expand Up @@ -262,7 +262,7 @@ public <R> R createSubsegment(String name, Function<Subsegment, R> function) {
}

/**
* Begins a subsegment and passes it to the supplied consumer. Intercepts exceptions, adds them to the subsegment, and re-throws them.
* Begins a subsegment and passes it to the supplied consumer, and ends the subsegment before returning the consumer's result. Intercepts exceptions, adds them to the subsegment, and re-throws them.
*
* @param name
* the name to use for the created subsegment
Expand Down

0 comments on commit f893f6c

Please sign in to comment.