From 8afdd7cf30b49bc07971b86151c15f730358781c Mon Sep 17 00:00:00 2001 From: Juan Fernandez Date: Thu, 24 Oct 2024 13:03:34 +0200 Subject: [PATCH] better name --- .../src/ci-visibility/exporters/agent-proxy/index.js | 4 ++-- .../agentless/{logs-writer.js => di-logs-writer.js} | 7 ++++--- .../src/ci-visibility/exporters/agentless/index.js | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) rename packages/dd-trace/src/ci-visibility/exporters/agentless/{logs-writer.js => di-logs-writer.js} (82%) diff --git a/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js b/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js index 44cb9fabe1..699e515e57 100644 --- a/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +++ b/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js @@ -71,8 +71,8 @@ class AgentProxyCiVisibilityExporter extends CiVisibilityExporter { evpProxyPrefix }) if (canFowardLogs && config.isTestDynamicInstrumentationEnabled) { - const LogsWriter = require('../agentless/logs-writer') - this._logsWriter = new LogsWriter({ + const DynamicInstrumentationLogsWriter = require('../agentless/di-logs-writer') + this._logsWriter = new DynamicInstrumentationLogsWriter({ url: this._url, tags, isAgentProxy: true diff --git a/packages/dd-trace/src/ci-visibility/exporters/agentless/logs-writer.js b/packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js similarity index 82% rename from packages/dd-trace/src/ci-visibility/exporters/agentless/logs-writer.js rename to packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js index 80be84bb18..962b6c7973 100644 --- a/packages/dd-trace/src/ci-visibility/exporters/agentless/logs-writer.js +++ b/packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js @@ -6,9 +6,10 @@ const { JSONEncoder } = require('../../encode/json-encoder') const BaseWriter = require('../../../exporters/common/writer') -// Writer to encode and send logs to both the logs intake directly and the +// Writer used by the integration between Dynamic Instrumentation and Test Visibility +// It is used to encode and send logs to both the logs intake directly and the // `/debugger/v1/input` endpoint in the agent, which is a proxy to the logs intake. -class LogsWriter extends BaseWriter { +class DynamicInstrumentationLogsWriter extends BaseWriter { constructor ({ url, isAgentProxy = false }) { super(...arguments) this._url = url @@ -47,4 +48,4 @@ class LogsWriter extends BaseWriter { } } -module.exports = LogsWriter +module.exports = DynamicInstrumentationLogsWriter diff --git a/packages/dd-trace/src/ci-visibility/exporters/agentless/index.js b/packages/dd-trace/src/ci-visibility/exporters/agentless/index.js index 910e25e5ea..a4c655daf4 100644 --- a/packages/dd-trace/src/ci-visibility/exporters/agentless/index.js +++ b/packages/dd-trace/src/ci-visibility/exporters/agentless/index.js @@ -22,9 +22,9 @@ class AgentlessCiVisibilityExporter extends CiVisibilityExporter { this._coverageWriter = new CoverageWriter({ url: this._coverageUrl }) if (config.isTestDynamicInstrumentationEnabled) { - const LogsWriter = require('./logs-writer') + const DynamicInstrumentationLogsWriter = require('./di-logs-writer') this._logsUrl = url || new URL(`https://http-intake.logs.${site}`) - this._logsWriter = new LogsWriter({ url: this._logsUrl, tags }) // TODO: pass tags? Pass other config? + this._logsWriter = new DynamicInstrumentationLogsWriter({ url: this._logsUrl, tags }) } this._apiUrl = url || new URL(`https://api.${site}`)