Skip to content

Conversation

puretension
Copy link

@puretension puretension commented Sep 17, 2025

What does this PR do?

Fixes the http_check integration's instance tag normalization to correctly preserve minuses (-) in tag values, making it consistent with DataDog's official tag rules and other integrations.

Motivation

Users reported in #21103 that the http_check integration incorrectly converts minuses to underscores in instance tags, which violates DataDog's tag documentation and creates inconsistency with other integrations like postgres that preserve minuses correctly.

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

- Add normalize_instance_tag() method that correctly preserves minuses (-) in instance tags
- Update documentation to reflect correct tag normalization behavior
- Fix test expectations to match preserved minuses behavior
- Resolves inconsistency with DataDog tag rules and other integrations

Fixes DataDog#21103
DataDog auto-generates this file, so we should not modify the documentation manually.
The actual behavior change is implemented in the code only.
- Remove trailing spaces and fix docstring formatting
- Ensure proper line spacing according to DataDog linting rules
Restore instance tag generation in _get_service_checks_tags method
that was accidentally removed in previous commit.
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.02%. Comparing base (b09564c) to head (b277eb4).
⚠️ Report is 4 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.

@puretension puretension force-pushed the fix/http-check-normalize-tag-preserve-minuses-21103 branch 2 times, most recently from 2519bc3 to 2025d19 Compare September 17, 2025 17:33
Copy link
Contributor

@buraizu buraizu left a comment

Choose a reason for hiding this comment

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

Requesting a few edits for branding and consistency

@puretension
Copy link
Author

@buraizu Thanks for catching the branding inconsistencies!
I've applied all your suggestions and will make sure to follow Datadog's brand guidelines in future contributions.

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