Comments (7)
@DataDog/agent-core should we escape or remove |
in tag?
Is there any documentation which specifies valid tags? I have only found https://docs.datadoghq.com/developers/metrics/dogstatsd_metrics_submission/?tab=python#metric-tagging.
see also #517
from datadogpy.
@jirikuncar https://docs.datadoghq.com/tagging/#defining-tags defines valid characters for tags. AFAIK statsd/dogstatsd do not specify how to escape characters that conflict with the protocol or are invalid. It probably make sense to either strip them or replace them by a valid character like _
.
In any case let's make sure we align with other clients if they have logic to escape tags / metric names.
from datadogpy.
@arbll thank you for the link. It doesn't say how the tags should be encoded in case of dogstatd
. We can add a validation, but |
seems like a valid character.
from datadogpy.
@jirikuncar |
is invalid for all datadog tags, so it's also invalid for dogstatsd.
Again, I don't think dogstatsd/statsd escaping is defined anywhere. See statsd/statsd#585 for example
from datadogpy.
@arbll so basically a tag has to match ^[A-Za-z][A-Za-z0-9_\-:,/]{0,199}$
after re.sub('[^A-Za-z0-9_\-:,/]', '_', tag)
, right?
Playground: https://regex101.com/r/yJ8qva/1/tests
from datadogpy.
Thanks for your contribution!
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. Thank you for participating in the Datadog open source community.
If you would like this issue to remain open:
-
Verify that you can still reproduce the issue in the latest version of this project.
-
Comment that the issue is still reproducible and include updated details requested in the issue template.
from datadogpy.
closed in #517
The library will now sanitize tags before sending them
from datadogpy.
Related Issues (20)
- Sending an event adds tags from agent config HOT 1
- Allow disabling statsd export via constructor arg HOT 1
- Support IPv6 hostnames in `dogstatsd` HOT 1
- dog event post does not type --related_event_id properly HOT 1
- Changing Statsd to UDS does not reset telemetry labels / max payload size HOT 2
- bytes_dropped is no longer available on DogStatsD client HOT 1
- Type statsd.timed HOT 4
- urllib3 2.0+ breaks tests? HOT 2
- dogwrap with StatsD instead of API HOT 1
- Support the standard DD_DOGSTATSD_URL environment variable HOT 4
- Report traceback error for http_client errors HOT 1
- Support installing datadogpy package through apt instead of pip HOT 2
- Support validating monitors using files HOT 2
- Type checking errors with datadog client due to private imports HOT 3
- Prompt for API_HOST on config setup HOT 1
- Stop accepting value `counter` passed as `--type` when using Dogshell cli HOT 1
- Possible bug with dogstatsd deadlock HOT 4
- Datadog changed URL for API Key HOT 1
- Mypy error: Module "datadog" does not explicitly export attribute "statsd" [attr-defined] HOT 2
- statsd logging does not work in UvicornWorker and does not throw any error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datadogpy.