Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize DD_TAGS format #162

Merged
merged 27 commits into from
Jul 21, 2023
Merged

Conversation

NouemanKHAL
Copy link
Member

@NouemanKHAL NouemanKHAL commented Apr 14, 2023

Requirements for Contributing to this repository

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must only fix one issue, or add one feature, at the time.

What does this PR do?

This PR aims to add a standard interface to use the environment variableDD_TAGS in the buildpack regardless of the target language. As a result, this PR fixes all issues related to DD_TAGS format.

Description of the Change

  • Add support for custom DD_TAGS separator via DD_TAGS_SEP
  • Pass custom tags to the tracing libraries via a comma-separated DD_TAGS
  • Pass custom tags to the agents via their yaml configuration file (tags, dogstatsd_tags)
  • Fix a typo in DD_NODE_AGENT_TAGS env variable
  • Fix tags parsing bugs

Alternate Designs

Possible Drawbacks

Verification Process

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)

  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@NouemanKHAL NouemanKHAL added the changelog/Added Added features results into a minor version bump label Apr 14, 2023
@NouemanKHAL NouemanKHAL requested a review from a team as a code owner April 14, 2023 18:22
bin/supply Outdated Show resolved Hide resolved
lib/run-datadog.sh Show resolved Hide resolved
lib/scripts/update_datadog_config.rb Show resolved Hide resolved
@NouemanKHAL NouemanKHAL requested a review from a team as a code owner April 17, 2023 17:44
@github-actions github-actions bot added the documentation Documentation related changes label Apr 17, 2023
Copy link
Contributor

@maycmlee maycmlee left a comment

Choose a reason for hiding this comment

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

Just a couple of suggestions

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@NouemanKHAL
Copy link
Member Author

Thank you @maycmlee !

maycmlee
maycmlee previously approved these changes Apr 18, 2023
Copy link
Contributor

@maycmlee maycmlee left a comment

Choose a reason for hiding this comment

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

👍 for docs

env:
DD_TAGS: "key1:value1,key2:value2,key3:value3"
DD_TAGS_SEP: ","
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also include a note about where the custom tags are included?

sarah-witt
sarah-witt previously approved these changes Apr 26, 2023
Copy link
Contributor

@maycmlee maycmlee left a comment

Choose a reason for hiding this comment

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

Just a couple of edits for the note.

README.md Outdated Show resolved Hide resolved
maycmlee
maycmlee previously approved these changes May 1, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days.
Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity.

@github-actions github-actions bot added the stale Stale - Bot reminder label Jun 25, 2023
@NouemanKHAL NouemanKHAL removed the stale Stale - Bot reminder label Jul 12, 2023
begin
delimiter = ','
delimiter = ' ' if tags.count(' ') > tags.count(',')
Copy link
Member Author

Choose a reason for hiding this comment

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

@sarah-witt keeping this line will keep this change backwards-compatible

README.md Outdated Show resolved Hide resolved
sarah-witt
sarah-witt previously approved these changes Jul 13, 2023
Co-authored-by: Sarah Witt <sarah.witt@datadoghq.com>
@NouemanKHAL NouemanKHAL merged commit 636b5e9 into master Jul 21, 2023
3 checks passed
@NouemanKHAL NouemanKHAL deleted the noueman/standardize-dd-tags-format branch July 21, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/Added Added features results into a minor version bump documentation Documentation related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants