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

Use ConfigUtil.splitPath to build environment tag keys from a config path #1303

Merged
merged 4 commits into from
Oct 27, 2023

Conversation

thyandrecardoso
Copy link
Contributor

@thyandrecardoso thyandrecardoso commented Oct 17, 2023

Config paths are different from config keys, and their difference is explained in the documentation from com.typesafe.config.Config.

The existing implementation uses the config path of kamon environment tags as the keys of a TagSet. This has the drawback of quoting some tags when it is not necessary. I am not sure if there a reason to assume a tag key corresponds to Config path, I am assuming there is not. Please correct me if I am wrong.

This PR tries to avoid quoting of tags by using ConfigUtil.splitPath() to break and unquote the path.

@hughsimpson
Copy link
Contributor

Will look at this tomorrow but seems reasonable

@thyandrecardoso
Copy link
Contributor Author

Thanks!

@hughsimpson hughsimpson merged commit a8bef44 into kamon-io:master Oct 27, 2023
1 check passed
hughsimpson added a commit to hughsimpson/Kamon that referenced this pull request Nov 7, 2023
…path (kamon-io#1303)

* = kamon-core: add tests that fail using tags with special chars

* = kamon-core: Use ConfigUtil.splitPath to build a tag key from a config path

* = kamon-core: Improve spec examples and formatting

---------

Co-authored-by: hughsimpson <hsimpson@rzsoftware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants