-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
putOptional(HttpFieldKey.QUERY, response.query) | ||
internal val fields: InternalFieldsMap = | ||
run { | ||
val fields = buildMap { |
There was a problem hiding this comment.
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?
platform/jvm/capture/src/main/kotlin/io/bitdrift/capture/network/HttpResponseInfo.kt
Outdated
Show resolved
Hide resolved
val normalized: String? = requestPathTemplate?.let { it } | ||
?: it.template?.let { it } | ||
?: try { | ||
CaptureJniLibrary.normalizeUrlPath(it.value) |
There was a problem hiding this comment.
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>", |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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.
The plan is to make this logic remote configuration configurable and move the actual implementation of the feature to shared-core repo instead.