Skip to content

fix(id): drop redundant tags optional chaining in agentless exporter/encoder - #9610

Merged
litianningdatadog merged 1 commit into
tianning.li/dd-trace-microvm-identity-refresh-option-bfrom
tianning.li/followup-cleanup
Aug 3, 2026
Merged

fix(id): drop redundant tags optional chaining in agentless exporter/encoder#9610
litianningdatadog merged 1 commit into
tianning.li/dd-trace-microvm-identity-refresh-option-bfrom
tianning.li/followup-cleanup

Conversation

@litianningdatadog

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #9355 addressing BridgeAR's review comments that tags will always be an object by the time these getters/checks run:

  • packages/dd-trace/src/exporters/agentless/index.jsconfig.tags?.['runtime-id']config.tags['runtime-id'] (comment)
  • packages/dd-trace/src/encode/agentless-ci-visibility.jsthis.tags?.env / this.tags?.['runtime-id'] → non-optional (comment, comment)
  • packages/dd-trace/src/dogstatsd.js — same redundant ?. on DogStatsDClient#tags, which is always built as an array by generateClientConfig()/buildClientConfig()

In every case, traced the constructor back to its only production caller: config.tags comes from the tracer's Config, which seeds tags to {} (never undefined) in #applyDefaults() before any other config logic runs.

Updated one test (test/encode/agentless-ci-visibility.spec.js) that constructed AgentlessCiVisibilityEncoder without tags — a shape no real caller produces — to pass tags: {} instead.

Test plan

  • ./node_modules/.bin/mocha packages/dd-trace/test/exporters/agentless/exporter.spec.js — 19 passing
  • ./node_modules/.bin/mocha packages/dd-trace/test/encode/agentless-ci-visibility.spec.js — 27 passing
  • ./node_modules/.bin/mocha packages/dd-trace/test/dogstatsd.spec.js — 48 passing, 1 pre-existing unrelated timeout (reproduced identically without this change)
  • ./node_modules/.bin/mocha packages/dd-trace/test/ci-visibility/exporters/agentless/writer.spec.js packages/dd-trace/test/ci-visibility/exporters/ci-validation.spec.js — 30 passing
  • npm run lint on touched files

🤖 Generated with Claude Code

@litianningdatadog
litianningdatadog requested review from a team as code owners July 30, 2026 19:40
@dd-octo-sts

dd-octo-sts Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 7.77 MB
Deduped: 8.44 MB
No deduping: 8.44 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.3 | 125.43 kB | 441.68 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 30, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 1 test - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 98.54% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 51f00d9 | Docs | Datadog PR Page | Give us feedback!

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

More details

The removed optional chaining is safe on the reviewed production paths: tracer configuration always materializes the tags object, DogStatsD always receives the generated tag array, and both CI writers pass the live tags object. Valid and empty-tag adversarial scenarios preserved metadata and metric output. No additional tests recommended: existing tests already cover the affected branches and the production-shaped inputs.

Was this helpful? React 👍 or 👎

📊 Validated against 8 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit ceb03fb · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes redundant optional chaining around tags access in agentless exporters/encoders and DogStatsD, aligning the code with the invariant that tracer config initializes tags (and DogStatsD client config initializes tags as an array) before these code paths run.

Changes:

  • Agentless APM exporter now reads runtime-id directly from config.tags['runtime-id'] and updates the JSDoc contract for config.tags.
  • Agentless CI Visibility encoder reads env and runtime-id directly from this.tags (non-optional) and updates a unit test to pass tags: {}.
  • DogStatsD client now builds #tagsPrefix using this.#tags.length (non-optional) in both constructor and updateTags().

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/dd-trace/test/encode/agentless-ci-visibility.spec.js Updates test setup to pass a realistic { tags: {} } config shape to the encoder.
packages/dd-trace/src/exporters/agentless/index.js Removes optional chaining on config.tags when reading runtime-id and tightens the documented config contract.
packages/dd-trace/src/encode/agentless-ci-visibility.js Removes optional chaining on this.tags for env/runtime-id emission in payload metadata.
packages/dd-trace/src/dogstatsd.js Removes optional chaining on the internal #tags array when computing the cached tag prefix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.53%. Comparing base (3effe66) to head (51f00d9).

Additional details and impacted files
@@                                    Coverage Diff                                     @@
##           tianning.li/dd-trace-microvm-identity-refresh-option-b    #9610      +/-   ##
==========================================================================================
+ Coverage                                                   97.38%   98.53%   +1.15%     
==========================================================================================
  Files                                                         955      955              
  Lines                                                      133754   133754              
  Branches                                                    10982    11721     +739     
==========================================================================================
+ Hits                                                       130250   131801    +1551     
+ Misses                                                       3504     1953    -1551     
Flag Coverage Δ
aiguard 56.84% <50.00%> (ø)
aiguard-integration 55.66% <50.00%> (ø)
apm-bucket-0 57.09% <50.00%> (ø)
apm-bucket-1 63.19% <50.00%> (ø)
apm-bucket-2 61.99% <50.00%> (ø)
apm-bucket-3 59.51% <50.00%> (ø)
apm-capabilities-tracing 62.74% <100.00%> (ø)
apm-integrations-aerospike 56.13% <50.00%> (ø)
apm-integrations-confluentinc-kafka-javascript 60.86% <50.00%> (ø)
apm-integrations-couchbase 56.56% <50.00%> (ø)
apm-integrations-http 61.86% <50.00%> (ø)
apm-integrations-kafkajs 61.45% <50.00%> (ø)
apm-integrations-next 58.58% <50.00%> (ø)
apm-integrations-prisma 58.16% <50.00%> (ø)
appsec 71.91% <50.00%> (ø)
appsec-express_fastify_graphql 69.33% <50.00%> (ø)
appsec-integration 50.46% <50.00%> (ø)
appsec-kafka_ldapjs_lodash 63.23% <50.00%> (ø)
appsec-mongodb-core_mongoose_mysql 66.84% <50.00%> (ø)
appsec-next 57.04% <50.00%> (ø)
appsec-node-serialize_passport_postgres 66.48% <50.00%> (ø)
appsec-sourcing_stripe_template 64.84% <50.00%> (ø)
debugger 64.17% <50.00%> (-0.02%) ⬇️
instrumentations-bucket-0 51.40% <50.00%> (ø)
instrumentations-bucket-1 59.45% <50.00%> (ø)
instrumentations-bucket-10 61.26% <50.00%> (ø)
instrumentations-bucket-11 51.31% <50.00%> (ø)
instrumentations-bucket-12 52.11% <50.00%> (ø)
instrumentations-bucket-13 51.42% <50.00%> (ø)
instrumentations-bucket-2 53.22% <50.00%> (ø)
instrumentations-bucket-3 58.50% <50.00%> (ø)
instrumentations-bucket-4 51.94% <50.00%> (ø)
instrumentations-bucket-5 56.96% <50.00%> (ø)
instrumentations-bucket-6 60.10% <50.00%> (ø)
instrumentations-bucket-7 57.88% <50.00%> (ø)
instrumentations-bucket-8 58.84% <50.00%> (ø)
instrumentations-bucket-9 60.79% <50.00%> (ø)
instrumentations-instrumentation-couchbase 50.65% <50.00%> (ø)
instrumentations-integration-esbuild 33.88% <ø> (ø)
llmobs-ai_anthropic_bedrock 62.32% <50.00%> (ø)
llmobs-bucket-1 61.13% <50.00%> (-0.01%) ⬇️
llmobs-openai 61.66% <50.00%> (ø)
llmobs-openai-agents_vertex-ai 59.61% <50.00%> (ø)
llmobs-sdk 65.99% <50.00%> (ø)
openfeature 55.45% <50.00%> (ø)
openfeature-unit 52.97% <50.00%> (ø)
platform-core_esbuild_instrumentations-misc 40.62% <50.00%> (ø)
platform-integration 60.39% <50.00%> (ø)
platform-shimmer_unit-guardrails_webpack 38.84% <50.00%> (ø)
plugins-bucket-0 56.66% <50.00%> (ø)
plugins-bucket-1 53.74% <50.00%> (ø)
plugins-bucket-11 61.68% <50.00%> (ø)
plugins-bucket-18 61.24% <50.00%> (ø)
plugins-bucket-19 59.42% <50.00%> (ø)
plugins-bucket-20 61.42% <50.00%> (ø)
plugins-bucket-4 58.01% <50.00%> (ø)
plugins-bullmq_cassandra_cookie 61.10% <50.00%> (ø)
plugins-cookie-parser_crypto_dd-trace-api 56.19% <50.00%> (ø)
plugins-fetch_fs_generic-pool 58.06% <50.00%> (?)
plugins-google-cloud-pubsub_grpc_handlebars 63.96% <50.00%> (ø)
plugins-hapi_hono_ioredis 59.61% <50.00%> (ø)
plugins-jest_knex_langgraph 55.17% <50.00%> (ø)
plugins-ldapjs_light-my-request_limitd-client 57.93% <50.00%> (+<0.01%) ⬆️
plugins-lodash_mariadb_memcached 57.52% <50.00%> (ø)
plugins-moleculer_mongodb_mongodb-core 61.23% <50.00%> (ø)
plugins-mongoose_multer_mysql 58.52% <50.00%> (ø)
plugins-mysql2_nats_node-serialize 60.06% <50.00%> (ø)
plugins-opensearch_passport-http_pino 58.96% <50.00%> (ø)
plugins-postgres_process_pug 58.11% <50.00%> (ø)
plugins-redis_router_sequelize 61.29% <50.00%> (ø)
plugins-test-and-upstream-rhea_undici_url 60.85% <50.00%> (ø)
plugins-valkey_vm_winston 57.47% <50.00%> (ø)
plugins-ws 58.98% <50.00%> (ø)
profiling 61.39% <50.00%> (ø)
serverless-aws-sdk-aws-sdk 54.69% <50.00%> (ø)
serverless-aws-sdk-base-inject-field 50.60% <50.00%> (ø)
serverless-aws-sdk-bedrockruntime 54.37% <50.00%> (ø)
serverless-aws-sdk-client 55.99% <50.00%> (ø)
serverless-aws-sdk-dynamodb 55.25% <50.00%> (?)
serverless-aws-sdk-eventbridge 49.11% <50.00%> (ø)
serverless-aws-sdk-kinesis 58.79% <50.00%> (ø)
serverless-aws-sdk-lambda 56.93% <50.00%> (ø)
serverless-aws-sdk-s3 55.34% <50.00%> (ø)
serverless-aws-sdk-serverless-peer-service 59.19% <50.00%> (ø)
serverless-aws-sdk-sns 59.62% <50.00%> (ø)
serverless-aws-sdk-sqs 60.05% <50.00%> (ø)
serverless-aws-sdk-stepfunctions 55.17% <50.00%> (ø)
serverless-aws-sdk-util 51.15% <50.00%> (ø)
serverless-bucket-0 53.80% <50.00%> (ø)
serverless-bucket-1 58.69% <50.00%> (ø)
test-optimization-cucumber 71.47% <75.00%> (-0.10%) ⬇️
test-optimization-cypress 65.34% <75.00%> (-0.03%) ⬇️
test-optimization-jest 72.82% <75.00%> (ø)
test-optimization-mocha 72.70% <75.00%> (ø)
test-optimization-playwright-playwright-atr 60.06% <75.00%> (ø)
test-optimization-playwright-playwright-efd 60.21% <75.00%> (?)
test-optimization-playwright-playwright-final-status 60.38% <75.00%> (?)
test-optimization-playwright-playwright-impacted-tests 59.90% <75.00%> (ø)
test-optimization-playwright-playwright-reporting 61.11% <75.00%> (-0.08%) ⬇️
test-optimization-playwright-playwright-test-management 60.92% <75.00%> (ø)
test-optimization-playwright-playwright-test-span 60.22% <75.00%> (+0.15%) ⬆️
test-optimization-selenium 59.65% <75.00%> (ø)
test-optimization-testopt 57.90% <75.00%> (+<0.01%) ⬆️
test-optimization-vitest 73.87% <75.00%> (?)
test-optimization-vitest-browser 58.95% <75.00%> (ø)
test-optimization-webdriverio 64.38% <75.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@litianningdatadog
litianningdatadog force-pushed the tianning.li/dd-trace-microvm-identity-refresh-option-b branch from 03a2c2a to b93ba51 Compare July 31, 2026 14:59
@litianningdatadog
litianningdatadog requested review from a team as code owners July 31, 2026 14:59
@litianningdatadog
litianningdatadog requested review from khanayan123 and removed request for a team July 31, 2026 14:59
@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch from ceb03fb to 51fee3e Compare July 31, 2026 15:04
@litianningdatadog
litianningdatadog force-pushed the tianning.li/dd-trace-microvm-identity-refresh-option-b branch from b93ba51 to 42fb068 Compare July 31, 2026 15:16
@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch from 51fee3e to 74187cb Compare July 31, 2026 15:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74187cb70a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/dd-trace/src/encode/agentless-ci-visibility.js
@litianningdatadog
litianningdatadog force-pushed the tianning.li/dd-trace-microvm-identity-refresh-option-b branch from 42fb068 to 60f47c6 Compare July 31, 2026 15:35
@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch 2 times, most recently from 670aa21 to a42c365 Compare July 31, 2026 18:47
@pr-commenter

pr-commenter Bot commented Jul 31, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-03 20:34:32

Comparing candidate commit 51f00d9 in PR branch tianning.li/followup-cleanup with baseline commit 3effe66 in branch tianning.li/dd-trace-microvm-identity-refresh-option-b.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2330 metrics, 28 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-204024.110µs; +204977.177µs] or [-7.654%; +7.690%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-227.605ms; +234.925ms] or [-8.871%; +9.156%]

scenario:appsec-appsec-enabled-with-attacks-24

  • unstable execution_time [-162.314ms; +168.352ms] or [-5.260%; +5.456%]

scenario:appsec-appsec-enabled-with-attacks-26

  • unstable execution_time [-191.167ms; +185.649ms] or [-6.587%; +6.397%]

scenario:appsec-control-20

  • unstable execution_time [-96.690ms; +136.885ms] or [-5.927%; +8.391%]

scenario:appsec-control-24

  • unstable execution_time [-114.130ms; +111.791ms] or [-9.165%; +8.977%]

scenario:appsec-control-26

  • unstable execution_time [-125.527ms; +117.464ms] or [-10.139%; +9.488%]

scenario:appsec-iast-no-vulnerability-control-20

  • unstable execution_time [-9.031ms; +26.079ms] or [-3.431%; +9.906%]

scenario:appsec-iast-no-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-12.006ms; +21.854ms] or [-4.673%; +8.506%]

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-20

  • unstable execution_time [-14162.541µs; +15065.941µs] or [-5.499%; +5.850%]

scenario:appsec-iast-with-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-32.551ms; +23.626ms] or [-5.807%; +4.214%]

scenario:debugger-line-probe-with-snapshot-default-24

  • unstable cpu_user_time [-2807.135ms; +2811.703ms] or [-31.682%; +31.734%]
  • unstable execution_time [-2960.183ms; +2983.299ms] or [-30.898%; +31.140%]
  • unstable instructions [-23879.9M instructions; +23948.1M instructions] or [-32.852%; +32.946%]
  • unstable max_rss_usage [-11388.068KB; +11408.068KB] or [-7.131%; +7.143%]
  • unstable throughput [-775.535op/s; +786.512op/s] or [-22.043%; +22.355%]

scenario:debugger-line-probe-without-snapshot-24

  • unstable cpu_user_time [-1734.428ms; +580.564ms] or [-20.915%; +7.001%]
  • unstable execution_time [-1735.116ms; +606.151ms] or [-19.330%; +6.753%]
  • unstable instructions [-15.0G instructions; +4.9G instructions] or [-22.229%; +7.223%]
  • unstable throughput [-170.823op/s; +460.912op/s] or [-4.655%; +12.559%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-347384.314µs; +348538.814µs] or [-7.155%; +7.179%]
  • unstable execution_time [-349.786ms; +343.649ms] or [-7.081%; +6.956%]
  • unstable throughput [-122924.195op/s; +126131.427op/s] or [-7.232%; +7.420%]

scenario:plugin-graphql-long-with-depth-off-26

  • unstable max_rss_usage [-36.522MB; +18.281MB] or [-16.718%; +8.368%]

scenario:plugin-graphql-long-with-depth-on-max-20

  • unstable cpu_user_time [-605.139ms; +574.412ms] or [-5.241%; +4.975%]
  • unstable execution_time [-621.744ms; +584.483ms] or [-5.276%; +4.960%]
  • unstable throughput [-3.445op/s; +3.623op/s] or [-5.043%; +5.304%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-3222.945KB; +4846.945KB] or [-4.103%; +6.171%]

@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch from a42c365 to 0db171f Compare July 31, 2026 23:32
@litianningdatadog
litianningdatadog force-pushed the tianning.li/dd-trace-microvm-identity-refresh-option-b branch from 9a30816 to 986d2e2 Compare July 31, 2026 23:57
@litianningdatadog
litianningdatadog requested a review from a team as a code owner July 31, 2026 23:57
@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch from 0db171f to 9bf2cd7 Compare July 31, 2026 23:57
@litianningdatadog
litianningdatadog force-pushed the tianning.li/dd-trace-microvm-identity-refresh-option-b branch from 986d2e2 to 4d60483 Compare August 1, 2026 00:11
@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch from 9bf2cd7 to ce322a2 Compare August 1, 2026 00:12
@litianningdatadog
litianningdatadog force-pushed the tianning.li/dd-trace-microvm-identity-refresh-option-b branch from 4d60483 to 7714864 Compare August 1, 2026 00:39
@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch from ce322a2 to cacbefe Compare August 1, 2026 00:40
@litianningdatadog
litianningdatadog force-pushed the tianning.li/dd-trace-microvm-identity-refresh-option-b branch from 7714864 to df2c5cc Compare August 1, 2026 00:57
@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch 2 times, most recently from 4e03431 to cdf643d Compare August 3, 2026 16:42
@litianningdatadog
litianningdatadog force-pushed the tianning.li/dd-trace-microvm-identity-refresh-option-b branch from c1717a5 to ff4f1f5 Compare August 3, 2026 18:14
@litianningdatadog
litianningdatadog requested a review from a team as a code owner August 3, 2026 18:14
@litianningdatadog
litianningdatadog requested review from crysmags and removed request for a team August 3, 2026 18:14
@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch from cdf643d to a7dc32f Compare August 3, 2026 18:14
@litianningdatadog
litianningdatadog force-pushed the tianning.li/dd-trace-microvm-identity-refresh-option-b branch from ff4f1f5 to 1b0e671 Compare August 3, 2026 18:41
@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch from a7dc32f to 0338ffa Compare August 3, 2026 18:42
@litianningdatadog
litianningdatadog force-pushed the tianning.li/dd-trace-microvm-identity-refresh-option-b branch from 1b0e671 to 3effe66 Compare August 3, 2026 20:20
…encoder

config.tags is always an object by the time these run - Config#applyDefaults
seeds it from DD_TAGS's default (parsed to {} for an empty string) before any
other config logic, and every production caller of these constructors passes
config.tags straight through. Addresses BridgeAR's "tags will always be an
object" review comments on #9355 for exporters/agentless/index.js and
encode/agentless-ci-visibility.js.

Also drops the same redundant `?.` on DogStatsDClient's #tags, which is
always populated via generateClientConfig()/buildClientConfig() (both build
it as an array, never undefined).

Updates one test that constructed AgentlessCiVisibilityEncoder without tags
(not a shape any real caller produces) to pass tags: {} instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@litianningdatadog
litianningdatadog force-pushed the tianning.li/followup-cleanup branch from 0338ffa to 51f00d9 Compare August 3, 2026 20:21
@litianningdatadog
litianningdatadog merged commit 20917aa into tianning.li/dd-trace-microvm-identity-refresh-option-b Aug 3, 2026
674 checks passed
@litianningdatadog
litianningdatadog deleted the tianning.li/followup-cleanup branch August 3, 2026 20:51
BridgeAR pushed a commit that referenced this pull request Aug 12, 2026
…encoder (#9610)

config.tags is always an object by the time these run - Config#applyDefaults
seeds it from DD_TAGS's default (parsed to {} for an empty string) before any
other config logic, and every production caller of these constructors passes
config.tags straight through. Addresses BridgeAR's "tags will always be an
object" review comments on #9355 for exporters/agentless/index.js and
encode/agentless-ci-visibility.js.

Also drops the same redundant `?.` on DogStatsDClient's #tags, which is
always populated via generateClientConfig()/buildClientConfig() (both build
it as an array, never undefined).

Updates one test that constructed AgentlessCiVisibilityEncoder without tags
(not a shape any real caller produces) to pass tags: {} instead.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
BridgeAR pushed a commit that referenced this pull request Aug 12, 2026
…encoder (#9610)

config.tags is always an object by the time these run - Config#applyDefaults
seeds it from DD_TAGS's default (parsed to {} for an empty string) before any
other config logic, and every production caller of these constructors passes
config.tags straight through. Addresses BridgeAR's "tags will always be an
object" review comments on #9355 for exporters/agentless/index.js and
encode/agentless-ci-visibility.js.

Also drops the same redundant `?.` on DogStatsDClient's #tags, which is
always populated via generateClientConfig()/buildClientConfig() (both build
it as an array, never undefined).

Updates one test that constructed AgentlessCiVisibilityEncoder without tags
(not a shape any real caller produces) to pass tags: {} instead.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
BridgeAR pushed a commit that referenced this pull request Aug 12, 2026
…encoder (#9610)

config.tags is always an object by the time these run - Config#applyDefaults
seeds it from DD_TAGS's default (parsed to {} for an empty string) before any
other config logic, and every production caller of these constructors passes
config.tags straight through. Addresses BridgeAR's "tags will always be an
object" review comments on #9355 for exporters/agentless/index.js and
encode/agentless-ci-visibility.js.

Also drops the same redundant `?.` on DogStatsDClient's #tags, which is
always populated via generateClientConfig()/buildClientConfig() (both build
it as an array, never undefined).

Updates one test that constructed AgentlessCiVisibilityEncoder without tags
(not a shape any real caller produces) to pass tags: {} instead.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
BridgeAR pushed a commit that referenced this pull request Aug 14, 2026
…encoder (#9610)

config.tags is always an object by the time these run - Config#applyDefaults
seeds it from DD_TAGS's default (parsed to {} for an empty string) before any
other config logic, and every production caller of these constructors passes
config.tags straight through. Addresses BridgeAR's "tags will always be an
object" review comments on #9355 for exporters/agentless/index.js and
encode/agentless-ci-visibility.js.

Also drops the same redundant `?.` on DogStatsDClient's #tags, which is
always populated via generateClientConfig()/buildClientConfig() (both build
it as an array, never undefined).

Updates one test that constructed AgentlessCiVisibilityEncoder without tags
(not a shape any real caller produces) to pass tags: {} instead.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants