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

filter_log_to_metrics: Fix config key after rename #7967

Closed

Conversation

wndhydrnt
Copy link
Contributor

@wndhydrnt wndhydrnt commented Sep 24, 2023

After #7739 was merged, the config key label was renamed to add_label in #7964.

Not all occurrences of the key label were renamed in #7964, which leads to a regression and failing tests.

This change renames the key throughout the code of the filter.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • [N/A] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • [N/A] Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@wndhydrnt wndhydrnt temporarily deployed to pr September 24, 2023 10:55 — with GitHub Actions Inactive
@wndhydrnt wndhydrnt temporarily deployed to pr September 24, 2023 10:55 — with GitHub Actions Inactive
@wndhydrnt wndhydrnt temporarily deployed to pr September 24, 2023 10:55 — with GitHub Actions Inactive
@wndhydrnt wndhydrnt force-pushed the fix-log_to_metrics-missing-key branch from e784379 to 0fdc7d0 Compare September 24, 2023 10:56
@wndhydrnt wndhydrnt temporarily deployed to pr September 24, 2023 10:57 — with GitHub Actions Inactive
@wndhydrnt wndhydrnt temporarily deployed to pr September 24, 2023 10:57 — with GitHub Actions Inactive
@wndhydrnt wndhydrnt temporarily deployed to pr September 24, 2023 10:57 — with GitHub Actions Inactive
@wndhydrnt
Copy link
Contributor Author

Configuration:

[SERVICE]
    Flush     1
    Log_Level debug

[INPUT]
    Name  dummy
    Dummy {"message":"This is a test","kubernetes":{"labels":{"app":"testservice"}}}

[FILTER]
    Name               log_to_metrics
    Match              *
    Tag                test_metric
    Add_label          app $kubernetes['labels']['app']
    Metric_mode        counter
    Metric_name        count_all_dummy_messages
    Metric_description This metric counts dummy messages

[OUTPUT]
    Name  stdout
    Match *

[OUTPUT]
    Name  prometheus_exporter
    Match test_metric
    Host  0.0.0.0
    Port  2021

@pwhelan
Copy link
Contributor

pwhelan commented Sep 26, 2023

It seems like I merged part of your change in #7972. Mind rebasing off of master so we can get the fixed log error message?

@wndhydrnt wndhydrnt force-pushed the fix-log_to_metrics-missing-key branch from 0fdc7d0 to 2b6d525 Compare September 26, 2023 15:57
@wndhydrnt wndhydrnt temporarily deployed to pr September 26, 2023 15:58 — with GitHub Actions Inactive
@wndhydrnt wndhydrnt temporarily deployed to pr September 26, 2023 15:58 — with GitHub Actions Inactive
@wndhydrnt wndhydrnt temporarily deployed to pr September 26, 2023 15:58 — with GitHub Actions Inactive
@wndhydrnt
Copy link
Contributor Author

Thanks for the hint @pwhelan. Now this PR contains a change to a log message only.

@cosmo0920 Feel free tom erge or close this MR as you see fit.

@wndhydrnt wndhydrnt temporarily deployed to pr September 26, 2023 16:25 — with GitHub Actions Inactive
@pwhelan pwhelan requested a review from cosmo0920 September 27, 2023 12:10
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Dec 29, 2023
@github-actions github-actions bot removed the Stale label Aug 16, 2024
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Dec 14, 2024
@wndhydrnt
Copy link
Contributor Author

Closing due to inactivity.

@wndhydrnt wndhydrnt closed this Dec 14, 2024
@wndhydrnt wndhydrnt deleted the fix-log_to_metrics-missing-key branch December 14, 2024 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants