-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
enhancement(file sink, aws_s3 sink, gcp_cloud_storage): configurable filename timezone #18506
Conversation
preparing for applying the same to `aws_s3` sink for filename timezone
* remove custom tz config * use VRL's timezone config * pass around SinkContext
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.
Ah, the integration tests are going to need to be updated with the new fields. For example here.
If you need to run the integration tests you can run cargo vdev int test aws
, cargo vdev int test file
and cargo vdev int test gcp
.
It also looks like a number of files need to be run through rustfmt
to ensure they are formatted correctly. You can see the files in the CI run here.
Formatting still needs fixing. You can check this by running |
This still doesn't compile all the tests. My apologies, I incorrectly said there were I realise we don't really have a list of the various jobs that need to pass before the PR can get merged. I've just pushed a PR that adds this to our CONTRIBUTING docs. You may find it useful, any feedback on it would be appreciated. |
Sorry for all the oversights. It's my first time trying to contribute to a large project. |
No worries at all! It highlighted some shortcomings in our developer documentation. We want the contribution process to be as seamless as possible. |
There appears to still be a clippy error with the changes to the S3 sink. Fixing that will let CI progress to the other checks. |
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.
Perfect. Thank you!
Regression Detector ResultsRun ID: 707fae87-c252-415f-adc5-ac711046ec2c ExplanationA regression test is an integrated performance test for Because a target's optimization goal performance in each experiment will vary somewhat each time it is run, we can only estimate mean differences in optimization goal relative to the baseline target. We express these differences as a percentage change relative to the baseline target, denoted "Δ mean %". These estimates are made to a precision that balances accuracy and cost control. We represent this precision as a 90.00% confidence interval denoted "Δ mean % CI": there is a 90.00% chance that the true value of "Δ mean %" is in that interval. We decide whether a change in performance is a "regression" -- a change worth investigating further -- if both of the following two criteria are true:
The table below, if present, lists those experiments that have experienced a statistically significant change in mean optimization goal performance between baseline and comparison SHAs with 90.00% confidence OR have been detected as newly erratic. Negative values of "Δ mean %" mean that baseline is faster, whereas positive values of "Δ mean %" mean that comparison is faster. Results that do not exhibit more than a ±5.00% change in their mean optimization goal are discarded. An experiment is erratic if its coefficient of variation is greater than 0.1. The abbreviated table will be omitted if no interesting change is observed. No interesting changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%. Fine details of change detection per experiment.
|
…filename timezone (vectordotdev#18506) * add TzOffset as File Sink configuration * integrate TzOffset into File Sink * apply tz offset to all log event in render_timestamp. * added TzOffset tests * adding chrono-tz for parsing timezones * rename tz_offset to path_tz. timezones are safer than offsets * update tz_offset references to path_tz * cargo fmt * remove unnecessary commented out code. fmt and generate-component-docs * clippy suggestions and remove TryFrom<&str> - serde handles converting to String * rename Template config option `path_tz` to `timezone` * move `path_tz.rs` to `src/config` preparing for applying the same to `aws_s3` sink for filename timezone * update doc configuration description for path_tz * fix wrong method name * AWS and GCS filename timezone support * remove custom tz config * use VRL's timezone config * pass around SinkContext * use TzOffset to pass down to request builders. VRL's TimeZone can't be hash derived * make key_prefix timezone aware and use Option `or` syntax * move tz to offset conversion codes to sink util * remove empty line * update timezone docs in vector-config * get timezone and convert to offset in one go in FileSink * just pass the sinkconfig directly * vector_common to vector_lib * configurable_component is in vector_lib now * lookup to vector_lib * fix aws s3 integration test. pass the context to build_processor in tests * formatting * add sinkcontext to FileSink in file tests * key_prefix is expected to be a template. no need for into
…filename timezone (vectordotdev#18506) * add TzOffset as File Sink configuration * integrate TzOffset into File Sink * apply tz offset to all log event in render_timestamp. * added TzOffset tests * adding chrono-tz for parsing timezones * rename tz_offset to path_tz. timezones are safer than offsets * update tz_offset references to path_tz * cargo fmt * remove unnecessary commented out code. fmt and generate-component-docs * clippy suggestions and remove TryFrom<&str> - serde handles converting to String * rename Template config option `path_tz` to `timezone` * move `path_tz.rs` to `src/config` preparing for applying the same to `aws_s3` sink for filename timezone * update doc configuration description for path_tz * fix wrong method name * AWS and GCS filename timezone support * remove custom tz config * use VRL's timezone config * pass around SinkContext * use TzOffset to pass down to request builders. VRL's TimeZone can't be hash derived * make key_prefix timezone aware and use Option `or` syntax * move tz to offset conversion codes to sink util * remove empty line * update timezone docs in vector-config * get timezone and convert to offset in one go in FileSink * just pass the sinkconfig directly * vector_common to vector_lib * configurable_component is in vector_lib now * lookup to vector_lib * fix aws s3 integration test. pass the context to build_processor in tests * formatting * add sinkcontext to FileSink in file tests * key_prefix is expected to be a template. no need for into
fix yaml test config and also format the code fix wrong usage log.get, now all tests are passing Ran cargo vdev fmt Fix reference in to_metrics_metadata in log_to_metric.rs Convert type errors to single error with type. Added test for multiple metrics but it is failing. Additional attempts to get the multiple_metadata_metrics working. fix(playground): fix playground vrl version and link (vectordotdev#19119) * fix(playground): fix playground vrl version and link * Ran cargo vdev fmt * remove redundant line * replace clone() with as_ref() whenever possible * Ran cargo vdev fmt chore(website): Fix commenting step on workflow (vectordotdev#19134) * fix: extra env vars into comment step * fix: add sleep to allow branch to connect * fix: update where branch name and sanitized branch name are used Remove multiple metrics test. chore(ci): Bump bufbuild/buf-setup-action from 1.27.2 to 1.28.0 (vectordotdev#19137) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.27.2 to 1.28.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](bufbuild/buf-setup-action@v1.27.2...v1.28.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): Bump the clap group with 1 update (vectordotdev#19127) Bumps the clap group with 1 update: [clap](https://github.com/clap-rs/clap). - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](clap-rs/clap@v4.4.7...v4.4.8) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: clap ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(releasing): Add known issue for Datadog Metrics sink in v0.34.0 (vectordotdev#19122) * chore(releasing): Add known issue for Datadog Metrics sink in v0.34.0 Ref: vectordotdev#19110 Signed-off-by: Jesse Szwedko <[email protected]> * Update website/cue/reference/releases/0.34.0.cue Co-authored-by: Brett Blue <[email protected]> --------- Signed-off-by: Jesse Szwedko <[email protected]> Co-authored-by: Brett Blue <[email protected]> chore(deps): Bump proptest from 1.3.1 to 1.4.0 (vectordotdev#19131) Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.3.1 to 1.4.0. - [Release notes](https://github.com/proptest-rs/proptest/releases) - [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md) - [Commits](proptest-rs/proptest@v1.3.1...v1.4.0) --- updated-dependencies: - dependency-name: proptest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): Bump env_logger from 0.10.0 to 0.10.1 (vectordotdev#19130) Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.10.0 to 0.10.1. - [Release notes](https://github.com/rust-cli/env_logger/releases) - [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md) - [Commits](rust-cli/env_logger@v0.10.0...v0.10.1) --- updated-dependencies: - dependency-name: env_logger dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(docs): Add alpha to traces and beta to metrics in descriptions (vectordotdev#19139) add alpha to traces and beta to metrics in descriptions Update README.md (vectordotdev#19142) chore(deps): Bump hdrhistogram from 7.5.2 to 7.5.3 (vectordotdev#19129) Bumps [hdrhistogram](https://github.com/HdrHistogram/HdrHistogram_rust) from 7.5.2 to 7.5.3. - [Release notes](https://github.com/HdrHistogram/HdrHistogram_rust/releases) - [Changelog](https://github.com/HdrHistogram/HdrHistogram_rust/blob/main/CHANGELOG.md) - [Commits](HdrHistogram/HdrHistogram_rust@v7.5.2...v7.5.3) --- updated-dependencies: - dependency-name: hdrhistogram dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> enhancement(file sink, aws_s3 sink, gcp_cloud_storage): configurable filename timezone (vectordotdev#18506) * add TzOffset as File Sink configuration * integrate TzOffset into File Sink * apply tz offset to all log event in render_timestamp. * added TzOffset tests * adding chrono-tz for parsing timezones * rename tz_offset to path_tz. timezones are safer than offsets * update tz_offset references to path_tz * cargo fmt * remove unnecessary commented out code. fmt and generate-component-docs * clippy suggestions and remove TryFrom<&str> - serde handles converting to String * rename Template config option `path_tz` to `timezone` * move `path_tz.rs` to `src/config` preparing for applying the same to `aws_s3` sink for filename timezone * update doc configuration description for path_tz * fix wrong method name * AWS and GCS filename timezone support * remove custom tz config * use VRL's timezone config * pass around SinkContext * use TzOffset to pass down to request builders. VRL's TimeZone can't be hash derived * make key_prefix timezone aware and use Option `or` syntax * move tz to offset conversion codes to sink util * remove empty line * update timezone docs in vector-config * get timezone and convert to offset in one go in FileSink * just pass the sinkconfig directly * vector_common to vector_lib * configurable_component is in vector_lib now * lookup to vector_lib * fix aws s3 integration test. pass the context to build_processor in tests * formatting * add sinkcontext to FileSink in file tests * key_prefix is expected to be a template. no need for into Update documentation Updated documentation to include example enhancement(networking, sinks): add full jitter to retry backoff policy (vectordotdev#19106) * enhancement(networking, sinks): add full jitter to retry backoff policy * fmt * fix tests * add test * fix * force ci fix(file source, kubernetes_logs source, file sink): make file internal metric tag opt-in (vectordotdev#19145) * fix(file source, kubernetes_logs source, file sink): make file internal metric tag opt-in * update cue * fix tests fix(datadog_metrics sink): evaluate series v1 env var at runtime (vectordotdev#19148) fix(datadog_metrics sink): evaluate v1 env var at runtime chore(website): WEB-4247 | Update references from s3 to setup.vector.dev (vectordotdev#19149) feat: update references from s3 to setup.vector.dev fix(ARC, networking): improve request settings (vectordotdev#19101) * fix(ARC, networking): improve request settings * fix spelling * change defaults * refactor * self-review * clippy * update default overrides * fmt nit * add upgrade guide entry Update src/transforms/log_to_metric.rs Co-authored-by: Pavlos Rontidis <[email protected]> Tweak and generate docs Tweak and generate docs Update website/cue/reference/components/transforms/base/log_to_metric.cue Co-authored-by: Heston Hoffman <[email protected]> Update website/cue/reference/components/transforms/base/log_to_metric.cue Co-authored-by: Heston Hoffman <[email protected]> Update website/cue/reference/components/transforms/base/log_to_metric.cue Co-authored-by: Heston Hoffman <[email protected]> Update src/transforms/log_to_metric.rs Co-authored-by: Heston Hoffman <[email protected]> Update src/transforms/log_to_metric.rs Co-authored-by: Heston Hoffman <[email protected]> Update src/transforms/log_to_metric.rs Co-authored-by: Heston Hoffman <[email protected]> Fix styling in example for all_metrics. Minor tweaks to formatting for documentation Fix minor issues with formatting that was causing tests to fail.
@jszwedko any idea when this can be released ? Waiting for this feature to released. |
It should be released this week. |
…filename timezone (vectordotdev#18506) * add TzOffset as File Sink configuration * integrate TzOffset into File Sink * apply tz offset to all log event in render_timestamp. * added TzOffset tests * adding chrono-tz for parsing timezones * rename tz_offset to path_tz. timezones are safer than offsets * update tz_offset references to path_tz * cargo fmt * remove unnecessary commented out code. fmt and generate-component-docs * clippy suggestions and remove TryFrom<&str> - serde handles converting to String * rename Template config option `path_tz` to `timezone` * move `path_tz.rs` to `src/config` preparing for applying the same to `aws_s3` sink for filename timezone * update doc configuration description for path_tz * fix wrong method name * AWS and GCS filename timezone support * remove custom tz config * use VRL's timezone config * pass around SinkContext * use TzOffset to pass down to request builders. VRL's TimeZone can't be hash derived * make key_prefix timezone aware and use Option `or` syntax * move tz to offset conversion codes to sink util * remove empty line * update timezone docs in vector-config * get timezone and convert to offset in one go in FileSink * just pass the sinkconfig directly * vector_common to vector_lib * configurable_component is in vector_lib now * lookup to vector_lib * fix aws s3 integration test. pass the context to build_processor in tests * formatting * add sinkcontext to FileSink in file tests * key_prefix is expected to be a template. no need for into
The PR will make timezone for timestamp in filenames configurable. It will use the global timezone from the SinkContext (
cx.globals.timezone
) but can be overridden in the sinks. As an example,We specified
Asia/Singapore
as global timezone. The File Sink will have the filename timestamp formatted withAsia/Singapore
. The S3 Sink will have the filename timestamp formatted withAustralia/Melbourne
timezone. The GCP Cloud Storage Sink will have its filename timestamp formatted withAsia/Kolkata
timezone.