Title: MapperConfig does not allow : in regex · Issue #645 · prometheus/client_java · GitHub
Open Graph Title: MapperConfig does not allow : in regex · Issue #645 · prometheus/client_java
X Title: MapperConfig does not allow : in regex · Issue #645 · prometheus/client_java
Description: Hi, Thanks for the custom mapper config on the dropwizard export. It makes creating tags really easy ❤️ I found a restriction in the regex that makes it impossible for me to create a certain configuration. : are not allowed and we have m...
Open Graph Description: Hi, Thanks for the custom mapper config on the dropwizard export. It makes creating tags really easy ❤️ I found a restriction in the regex that makes it impossible for me to create a certain config...
X Description: Hi, Thanks for the custom mapper config on the dropwizard export. It makes creating tags really easy ❤️ I found a restriction in the regex that makes it impossible for me to create a certain config...
Opengraph URL: https://github.com/prometheus/client_java/issues/645
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MapperConfig does not allow : in regex","articleBody":"Hi,\r\n\r\nThanks for the custom mapper config on the dropwizard export. It makes creating tags really easy :heart: \r\n\r\nI found a restriction in the regex that makes it impossible for me to create a certain configuration. `:` are not allowed and we have metrics that contain `ip:port` in the metric name.\r\n\r\nhttps://github.com/prometheus/client_java/blob/29dfd0a2bf9b93282764d31447b843a1d36d4f10/simpleclient_dropwizard/src/main/java/io/prometheus/client/dropwizard/samplebuilder/MapperConfig.java#L25\r\n\r\nThis is what the mapper config would look like\r\n\r\n```java\r\n// this port is dynamically set from the outside\r\nfinal int httpPort = 8080\r\nfinal MapperConfig vertxServerHttp = new MapperConfig(\r\n // the IP address is always 0.0.0.0\r\n \"vertx.http.servers.0.0.0.0:\" + httpPort + \".*\", \"vertx.http.servers.${4}\",\r\n ImmutableMap.of(\"endpoint\", \"http\")\r\n);\r\n```\r\n\r\nSo the metric currentely ends up like this in prometheus\r\n\r\n```\r\nvertx_http_servers_0_0_0_0:8080_metric\r\n```\r\n\r\nwhich gets messy as ports change.\r\n\r\n## Suggestion\r\n\r\nAdd `:` to the global regex.\r\n\r\nI don't know what implications this would have\r\n\r\n","author":{"url":"https://github.com/muuki88","@type":"Person","name":"muuki88"},"datePublished":"2021-03-24T14:12:15Z","url":"https://github.com/prometheus/client_java/issues/645"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d725f50b-61c9-8c46-e69a-8cd7ed942936 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A820:5E1B7:2B72EB:3ABB3E:6AFBB197 |
| html-safe-nonce | fca584218234cbf10a0799cbf8cb8711b3595d2a0f5c7959bcc01c1870e07549 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODIwOjVFMUI3OjJCNzJFQjozQUJCM0U6NkFGQkIxOTciLCJ2aXNpdG9yX2lkIjoiMjA4NjQzODg1NDQxNTA2OTU5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c6e68466683d17e5bad8454dc15d7202229e0df25e292b51710c664c3c1ddb83 |
| hovercard-subject-tag | issue:839765821 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/prometheus/client_java/645/issue_layout |
| twitter:image | https://opengraph.githubassets.com/39ff59e664055a61f0740eae6f8ba7d284aa670cc716aefc0098a438789b91fa/prometheus/client_java/issues/645 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/39ff59e664055a61f0740eae6f8ba7d284aa670cc716aefc0098a438789b91fa/prometheus/client_java/issues/645 |
| og:image:alt | Hi, Thanks for the custom mapper config on the dropwizard export. It makes creating tags really easy ❤️ I found a restriction in the regex that makes it impossible for me to create a certain config... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | muuki88 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c |
| turbo-cache-control | no-preview |
| go-import | github.com/prometheus/client_java git https://github.com/prometheus/client_java.git |
| octolytics-dimension-user_id | 3380462 |
| octolytics-dimension-user_login | prometheus |
| octolytics-dimension-repository_id | 7997879 |
| octolytics-dimension-repository_nwo | prometheus/client_java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7997879 |
| octolytics-dimension-repository_network_root_nwo | prometheus/client_java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e4cce0e99cf61481a318ff12c2e8580153a6c7c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width