-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Kubernetes_logs. Add delimiters for different OS in path_helper. Issue#18521 #19799
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
base: master
Are you sure you want to change the base?
Kubernetes_logs. Add delimiters for different OS in path_helper. Issue#18521 #19799
Conversation
| let mut components = path.rsplit('/'); | ||
| let delimiter; | ||
|
|
||
| if path.chars().nth(4) == Some('/') { |
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.
Rather than looking at the filepath to try to determine the host system, could we instead use std::path::MAIN_SEPARATOR which should be / on Linux and \ on Windows?
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.
Yes, thanks for the idea, I changed it to MAIN_SEPARATOR. I think this will be right.
jszwedko
left a comment
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.
Thanks! One other thing that I forgot to ask for: can you add a changelog fragment for this change? See https://github.com/vectordotdev/vector/blob/master/changelog.d/README.md
Co-authored-by: Jesse Szwedko <jesse@szwedko.me>
…delimiter_for_different_OS/issue#18521
Co-authored-by: Jesse Szwedko <jesse@szwedko.me>
Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
Regression Detector ResultsRun ID: 39505e97-d21a-47a7-aa9b-c3199f8650e9 Performance changes are noted in the perf column of each table:
No significant changes in experiment optimization goalsConfidence level: 90.00% There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
|
| perf | experiment | goal | Δ mean % | Δ mean % CI |
|---|---|---|---|---|
| ➖ | http_to_http_acks | ingress throughput | +1.20 | [-0.13, +2.52] |
| ➖ | http_elasticsearch | ingress throughput | +1.00 | [+0.93, +1.07] |
| ➖ | syslog_splunk_hec_logs | ingress throughput | +0.78 | [+0.72, +0.83] |
| ➖ | datadog_agent_remap_datadog_logs_acks | ingress throughput | +0.57 | [+0.48, +0.65] |
| ➖ | splunk_hec_route_s3 | ingress throughput | +0.45 | [-0.04, +0.95] |
| ➖ | syslog_log2metric_humio_metrics | ingress throughput | +0.40 | [+0.30, +0.50] |
| ➖ | datadog_agent_remap_datadog_logs | ingress throughput | +0.25 | [+0.16, +0.33] |
| ➖ | http_to_s3 | ingress throughput | +0.11 | [-0.17, +0.39] |
| ➖ | http_to_http_json | ingress throughput | +0.07 | [-0.01, +0.15] |
| ➖ | http_to_http_noack | ingress throughput | +0.04 | [-0.04, +0.13] |
| ➖ | splunk_hec_to_splunk_hec_logs_acks | ingress throughput | +0.00 | [-0.16, +0.16] |
| ➖ | splunk_hec_indexer_ack_blackhole | ingress throughput | -0.00 | [-0.14, +0.14] |
| ➖ | otlp_grpc_to_blackhole | ingress throughput | -0.03 | [-0.11, +0.06] |
| ➖ | splunk_hec_to_splunk_hec_logs_noack | ingress throughput | -0.03 | [-0.14, +0.09] |
| ➖ | otlp_http_to_blackhole | ingress throughput | -0.07 | [-0.21, +0.06] |
| ➖ | enterprise_http_to_http | ingress throughput | -0.08 | [-0.17, -0.00] |
| ➖ | fluent_elasticsearch | ingress throughput | -0.24 | [-0.71, +0.23] |
| ➖ | datadog_agent_remap_blackhole | ingress throughput | -0.29 | [-0.39, -0.20] |
| ➖ | syslog_loki | ingress throughput | -0.41 | [-0.46, -0.36] |
| ➖ | syslog_log2metric_splunk_hec_metrics | ingress throughput | -0.43 | [-0.57, -0.29] |
| ➖ | socket_to_socket_blackhole | ingress throughput | -0.62 | [-0.69, -0.55] |
| ➖ | http_text_to_http_json | ingress throughput | -0.67 | [-0.80, -0.53] |
| ➖ | syslog_regex_logs2metric_ddmetrics | ingress throughput | -0.69 | [-0.84, -0.54] |
| ➖ | datadog_agent_remap_blackhole_acks | ingress throughput | -0.86 | [-0.95, -0.77] |
| ➖ | syslog_humio_logs | ingress throughput | -0.96 | [-1.05, -0.88] |
| ➖ | file_to_blackhole | egress throughput | -1.02 | [-3.49, +1.44] |
| ➖ | syslog_log2metric_tag_cardinality_limit_blackhole | ingress throughput | -2.16 | [-2.29, -2.02] |
Explanation
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
|
This change caused a test failure on Windows: vector/src/sources/kubernetes_logs/pod_metadata_annotator.rs Lines 753 to 784 in a7fe0db
This appears to be because the test is using unix-style path delimiters. I think it needs to be updated to use https://doc.rust-lang.org/std/path/struct.Path.html#method.join. |
|
I can add the following code to the test |
|
@tmb-piXel I'd suggest just doing something like: that way it'll create the right path for the platform the test is running on rather than you needing to have a conditional in the test file depending on platform. Does that make sense? |
This implements the changes from vectordotdev#19799, including the suggested fix for the failing test. I've been running the change with the path separator successfully for 5 months now.
…ubernetes log files on Windows (#21505) * support scraping metadata from Kubernetes log files on Windows This implements the changes from #19799, including the suggested fix for the failing test. I've been running the change with the path separator successfully for 5 months now. * add changelog entry for #18521 fix * fix typo in changelog entry * Update changelog.d/18521-kubernetes-windows-metadata.enhancement.md * cargo fmt Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com> * Add missing import Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com> * fix type differences in the new path test cases * run cargo fmt --------- Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com> Co-authored-by: Jesse Szwedko <jesse@szwedko.me> Co-authored-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
|
This now has some merge conflicts. Also is it causing a reproducible issue or does it fix an open issue? PR is missing a description |
1720078 to
ffe54be
Compare
No description provided.