Skip to content

Commit

Permalink
Add param notes
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlanabrennan committed Oct 9, 2024
1 parent 727aa9f commit 39e63ab
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/transaction/trace/segment.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ const ATTRIBUTE_SCOPE = 'segment'
* @classdesc
* TraceSegments are inserted to track instrumented function calls. Each one is
* bound to a transaction, given a name (used only internally to the framework
* @param transaction
* for now), and has one or more children (that are also part of the same
* transaction), as well as an associated timer.
* @param config
* @param transaction The transaction.
* @param config The agent config.
* @param {string} name
* Human-readable name for this segment (e.g. 'http', 'net', 'express',
* 'mysql', etc).
Expand Down Expand Up @@ -116,6 +116,7 @@ TraceSegment.prototype.isInCallbackState = function isInCallbackState() {
* For use when a transaction is ending. The transaction segment should
* be named after the transaction it belongs to (which is only known by
* the end).
* @param transaction The transaction.
*/

TraceSegment.prototype.setNameFromTransaction = function setNameFromTransaction(transaction) {
Expand All @@ -133,6 +134,7 @@ TraceSegment.prototype.setNameFromTransaction = function setNameFromTransaction(
* recording, it's also necessary to copy the transaction's partial name. And
* finally, marking the trace segment as being a web segment copies the
* segment's parameters onto the transaction.
* @param transaction The transaction.
*/

TraceSegment.prototype.markAsWeb = function markAsWeb(transaction) {
Expand All @@ -150,7 +152,7 @@ TraceSegment.prototype.markAsWeb = function markAsWeb(transaction) {
* A segment attached to something evented (such as a database
* cursor) just finished an action, so set the timer to mark
* the timer as having a stop time.
* @param transaction
* @param transaction The transaction.
*/
TraceSegment.prototype.touch = function touch(transaction) {
this.probe('Touched', transaction, this.name)
Expand Down Expand Up @@ -217,10 +219,10 @@ TraceSegment.prototype._isEnded = function _isEnded() {
/**
* Add a new segment to a scope implicitly bounded by this segment.
*
* @param config
* @param config The agent config.
* @param {string} childName New human-readable name for the segment.
* @param segmentsSeen
* @param transactionId
* @param transactionId The transaction id.
* @returns {TraceSegment} New nested TraceSegment.
*/
TraceSegment.prototype.add = function add(config, childName, segmentsSeen, transactionId) {
Expand Down

0 comments on commit 39e63ab

Please sign in to comment.