Skip to content

Add http_status_code tag to http metrics#23731

Merged
ddog-nasirthomas merged 5 commits into
masterfrom
nasir.thomas/http-status-code
May 18, 2026
Merged

Add http_status_code tag to http metrics#23731
ddog-nasirthomas merged 5 commits into
masterfrom
nasir.thomas/http-status-code

Conversation

@ddog-nasirthomas

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds an http_status_code tag for the following metrics:

  • network.http.response_time
  • network.http.can_connect
  • network.http.cant_connect

Motivation

Customer feature request.

Customers need to see which status codes their endpoints return. Today they work around this with the config http_response_status_code and manually configuring it on each instance, which doesn’t scale when many URLs intermittently return codes like 521

Previous workaround:

http_response_status_code: (2)\d\d
    tags:
      - status:2xx 

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@dd-octo-sts

dd-octo-sts Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 20 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and Codecov settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@codecov

codecov Bot commented May 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.06%. Comparing base (7005266) to head (9d76844).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
🚀 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.

@datadog-prod-us1-5

Copy link
Copy Markdown

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 85.71%
Overall Coverage: 94.20%

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

@ddog-nasirthomas

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ddog-nasirthomas ddog-nasirthomas marked this pull request as ready for review May 18, 2026 18:49
@ddog-nasirthomas ddog-nasirthomas requested a review from a team as a code owner May 18, 2026 18:49
@ddog-nasirthomas ddog-nasirthomas added this pull request to the merge queue May 18, 2026
Merged via the queue into master with commit e9db1f4 May 18, 2026
52 of 57 checks passed
@ddog-nasirthomas ddog-nasirthomas deleted the nasir.thomas/http-status-code branch May 18, 2026 20:31
@dd-octo-sts dd-octo-sts Bot added this to the 7.81.0 milestone May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants