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

health dashboards: remove path templatization logic #9

Merged
merged 8 commits into from
Aug 28, 2024

Conversation

Augustyniak
Copy link
Contributor

The plan is to make this logic remote configuration configurable and move the actual implementation of the feature to shared-core repo instead.

@Augustyniak Augustyniak requested a review from murki August 28, 2024 16:07
putOptional(HttpFieldKey.QUERY, response.query)
internal val fields: InternalFieldsMap =
run {
val fields = buildMap {
Copy link
Contributor

Choose a reason for hiding this comment

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

this code is very hard to reason about, can you add some comments about what you're trying to achieve here?

val normalized: String? = requestPathTemplate?.let { it }
?: it.template?.let { it }
?: try {
CaptureJniLibrary.normalizeUrlPath(it.value)
Copy link
Contributor

Choose a reason for hiding this comment

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

it's great to be able to get rid of this call

@@ -125,7 +125,6 @@ class CaptureLoggerTest {
"_host" to "api.bitdrift.io",
"_method" to "GET",
"_path" to "/my_path/12345",
"_path_template" to "/my_path/<id>",
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 now remove the CaptureJniLibrary.load() and maybe even make it a plain unit test (vs robolectric one)?

Copy link
Contributor Author

@Augustyniak Augustyniak Aug 28, 2024

Choose a reason for hiding this comment

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

not this particular test, it starts a test server and does depend on some native code. I removed CaptureJniLibrary.load from three other places tho.

@Augustyniak Augustyniak merged commit 69cb881 into main Aug 28, 2024
15 checks passed
@Augustyniak Augustyniak deleted the remove-path-templatization-logic branch August 28, 2024 19:41
@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants