Skip to content

Commit

Permalink
[DI] Add hostname to probe result (#4756)
Browse files Browse the repository at this point in the history
  • Loading branch information
watson authored and tlhunter committed Oct 7, 2024
1 parent 04dbc17 commit 86bc5d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration-tests/debugger/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

const path = require('path')
const { randomUUID } = require('crypto')
const os = require('os')

const getPort = require('get-port')
const Axios = require('axios')
const { assert } = require('chai')
Expand Down Expand Up @@ -283,6 +285,7 @@ describe('Dynamic Instrumentation', function () {
agent.on('debugger-input', ({ payload }) => {
const expected = {
ddsource: 'dd_debugger',
hostname: os.hostname(),
service: 'node',
message: 'Hello World!',
logger: {
Expand Down
3 changes: 3 additions & 0 deletions packages/dd-trace/src/debugger/devtools_client/send.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'

const { hostname: getHostname } = require('os')
const { stringify } = require('querystring')

const config = require('./config')
Expand All @@ -9,6 +10,7 @@ const { GIT_COMMIT_SHA, GIT_REPOSITORY_URL } = require('../../plugins/util/tags'
module.exports = send

const ddsource = 'dd_debugger'
const hostname = getHostname()
const service = config.service

const ddtags = [
Expand All @@ -28,6 +30,7 @@ function send (message, logger, snapshot, cb) {

const payload = {
ddsource,
hostname,
service,
message,
logger,
Expand Down

0 comments on commit 86bc5d4

Please sign in to comment.