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

Tag normalization #489

Merged
merged 3 commits into from
Dec 16, 2019
Merged

Tag normalization #489

merged 3 commits into from
Dec 16, 2019

Conversation

dabcoder
Copy link
Contributor

@dabcoder dabcoder commented Nov 28, 2019

Addresses #485. Manually tested too.

@dabcoder dabcoder marked this pull request as ready for review November 28, 2019 17:28
@dabcoder dabcoder requested a review from a team as a code owner November 28, 2019 17:28
datadog/util/format.py Outdated Show resolved Hide resolved
ofek
ofek previously requested changes Nov 28, 2019
datadog/util/format.py Outdated Show resolved Hide resolved
@dabcoder
Copy link
Contributor Author

/azp run DataDog.datadogpy.integration

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@jd jd left a comment

Choose a reason for hiding this comment

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

Is this the only place this is happening? e.g. statsd?

@dabcoder
Copy link
Contributor Author

dabcoder commented Dec 3, 2019

@jd Actually I looked at it a bit more and it is possible to add a parameter constant_tags:

:param constant_tags: Tags to attach to all metrics
:type constant_tags: list of strings
(A list of strings). Unsure if we'd need to make the same change there though.
EDIT: constant_tags is based on DATADOG_TAGS (env var) and is a comma separated string, so I don't believe we need to change anything there.

@zippolyte
Copy link
Contributor

/azp run DataDog.datadogpy.integration

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zippolyte zippolyte merged commit 158aeea into master Dec 16, 2019
@zippolyte zippolyte deleted the davidb/commas-in-tags branch December 16, 2019 12:08
@zippolyte zippolyte added the changelog/Added Added features results into a minor version bump label Feb 4, 2020
walerian777 pushed a commit to walerian777/datadogpy that referenced this pull request Dec 12, 2022
According to the documentation
https://docs.datadoghq.com/metrics/custom_metrics/#naming-custom-metrics
metric names contain only ASCII alphanumerics, underscores,
and periods, while other characters are converted to underscores.

This commit ensures we replace all invalid characters with underscores
for both namespaces and metric names.

A similar thing has been already done for tags in DataDog#489 and DataDog#517,
so I followed the example.

It solves DataDog#740.
walerian777 pushed a commit to walerian777/datadogpy that referenced this pull request Dec 12, 2022
According to the documentation
https://docs.datadoghq.com/metrics/custom_metrics/#naming-custom-metrics
metric names contain only ASCII alphanumerics, underscores,
and periods, while other characters are converted to underscores.

This commit ensures we replace all invalid characters with underscores
for both namespaces and metric names.

A similar thing has been already done for tags in DataDog#489 and DataDog#517,
so I followed the example.

It solves DataDog#740.
walerian777 pushed a commit to walerian777/datadogpy that referenced this pull request Dec 12, 2022
According to the documentation
https://docs.datadoghq.com/metrics/custom_metrics/#naming-custom-metrics
metric names contain only ASCII alphanumerics, underscores,
and periods, while other characters are converted to underscores.

This commit ensures we replace all invalid characters with underscores
for both namespaces and metric names.

A similar thing has been already done for tags in DataDog#489 and DataDog#517,
so I followed the example.

It solves DataDog#740.
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants