Skip to content

Commit

Permalink
[pinpoint-apm#223] commonStreamResponse's sequenceid per requestid of…
Browse files Browse the repository at this point in the history
… Active Thread Count
  • Loading branch information
feelform committed Sep 13, 2024
1 parent 0faf843 commit c9594a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/client/grpc-data-sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class GrpcDataSender {
this.commandStream = new GrpcReadableStream(() => {
const writable = this.profilerClient.handleCommandV2()

let activeThreadCountSequenceId = 0
writable.on('data', (cmdRequest) => {
const requestId = cmdRequest.getRequestid()
const command = cmdRequest.getCommandCase()
Expand All @@ -171,7 +172,8 @@ class GrpcDataSender {
'ACTIVE_THREAD_COUNT': () => {
const commonStreamResponse = new cmdMessages.PCmdStreamResponse()
commonStreamResponse.setResponseid(requestId)
commonStreamResponse.setSequenceid(1)
activeThreadCountSequenceId++
commonStreamResponse.setSequenceid(activeThreadCountSequenceId)
const stringValue = new wrappers.StringValue()
stringValue.setValue('')
commonStreamResponse.setMessage(stringValue)
Expand Down
1 change: 0 additions & 1 deletion lib/metric/active-thread-count.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

const Scheduler = require('../utils/scheduler')
const activeTrace = require('./active-trace')
const log = require('../utils/logger')

class ActiveThreadCount {
constructor(dataSender, streamChannelManager, enabled) {
Expand Down

0 comments on commit c9594a7

Please sign in to comment.