Skip to content

Commit

Permalink
wip: added comments to tell svetlana what to update
Browse files Browse the repository at this point in the history
  • Loading branch information
bizob2828 committed Oct 8, 2024
1 parent bb0a1ef commit 5315458
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/transaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,8 @@ Transaction.prototype._markAsWeb = function _markAsWeb(rawURL) {
}
}
}
this.baseSegment.markAsWeb()
// TODO: pass in tx
this.baseSegment.markAsWeb(this)
}

/**
Expand Down
3 changes: 3 additions & 0 deletions lib/transaction/trace/segment.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ TraceSegment.prototype.isInCallbackState = function isInCallbackState() {
}

TraceSegment.prototype.probe = function probe(action) {
// move probing from transaction to a utility
if (this.transaction.traceStacks) {
this.transaction.probe(action, { segment: this.name })
}
Expand All @@ -136,6 +137,7 @@ TraceSegment.prototype.probe = function probe(action) {
* be named after the transaction it belongs to (which is only known by
* the end).
*/
// TODO: pass in tx
TraceSegment.prototype.setNameFromTransaction = function setNameFromTransaction() {
const transaction = this.transaction

Expand All @@ -154,6 +156,7 @@ TraceSegment.prototype.setNameFromTransaction = function setNameFromTransaction(
* finally, marking the trace segment as being a web segment copies the
* segment's parameters onto the transaction.
*/
// TODO: pass in tx
TraceSegment.prototype.markAsWeb = function markAsWeb() {
const transaction = this.transaction
this.setNameFromTransaction()
Expand Down
3 changes: 3 additions & 0 deletions lib/transaction/tracer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ function createSegment(name, recorder, _parent) {
)
return null
}
// pass in agent config
// increment the transaction and agent counters here
return parent.add(name, recorder)
// after segment is created add the recorder to the transaction
}

function addSegment(name, recorder, parent, full, task) {
Expand Down

0 comments on commit 5315458

Please sign in to comment.