Skip to content

Commit

Permalink
[DI] Add GitHub repo and SHA tags to probe results (#4751)
Browse files Browse the repository at this point in the history
  • Loading branch information
watson authored Oct 3, 2024
1 parent e09305d commit f988e00
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/dd-trace/src/debugger/devtools_client/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const log = require('../../log')
const config = module.exports = {
runtimeId: parentConfig.tags['runtime-id'],
service: parentConfig.service,
commitSHA: parentConfig.commitSHA,
repositoryUrl: parentConfig.repositoryUrl,
parentThreadId
}

Expand Down
12 changes: 11 additions & 1 deletion packages/dd-trace/src/debugger/devtools_client/send.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
'use strict'

const { stringify } = require('querystring')

const config = require('./config')
const request = require('../../exporters/common/request')
const { GIT_COMMIT_SHA, GIT_REPOSITORY_URL } = require('../../plugins/util/tags')

module.exports = send

const ddsource = 'dd_debugger'
const service = config.service

const ddtags = [
[GIT_COMMIT_SHA, config.commitSHA],
[GIT_REPOSITORY_URL, config.repositoryUrl]
].map((pair) => pair.join(':')).join(',')

const path = `/debugger/v1/input?${stringify({ ddtags })}`

function send (message, logger, snapshot, cb) {
const opts = {
method: 'POST',
url: config.url,
path: '/debugger/v1/input',
path,
headers: { 'Content-Type': 'application/json; charset=utf-8' }
}

Expand Down

0 comments on commit f988e00

Please sign in to comment.