Skip to content

Commit a2ff667

Browse files
authored
refactor(ci-visibility): simplify DI logs writer (#7373)
Remove unused tags parameter from agent proxy and add default timeout value to DI logs writer constructor. This consolidates the default timeout logic and removes unnecessary parameter passing.
1 parent d119cf2 commit a2ff667

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ class AgentProxyCiVisibilityExporter extends CiVisibilityExporter {
7373
const DynamicInstrumentationLogsWriter = require('../agentless/di-logs-writer')
7474
this._logsWriter = new DynamicInstrumentationLogsWriter({
7575
url: this._url,
76-
tags,
7776
isAgentProxy: true
7877
})
7978
this._canForwardLogs = true

packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const BaseWriter = require('../../../exporters/common/writer')
1111
// It is used to encode and send logs to both the logs intake directly and the
1212
// `/debugger/v1/input` endpoint in the agent, which is a proxy to the logs intake.
1313
class DynamicInstrumentationLogsWriter extends BaseWriter {
14-
constructor ({ url, timeout, isAgentProxy = false }) {
14+
// TODO: what's a good value for timeout for the logs intake?
15+
constructor ({ url, timeout = 15_000, isAgentProxy = false }) {
1516
super(...arguments)
1617
this._url = url
1718
this._encoder = new JSONEncoder()
@@ -27,8 +28,7 @@ class DynamicInstrumentationLogsWriter extends BaseWriter {
2728
'dd-api-key': getValueFromEnvSources('DD_API_KEY'),
2829
'Content-Type': 'application/json'
2930
},
30-
// TODO: what's a good value for timeout for the logs intake?
31-
timeout: this.timeout || 15_000,
31+
timeout: this.timeout,
3232
url: this._url
3333
}
3434

0 commit comments

Comments
 (0)