Skip to content

feat(outputs.mongodb): Allow specifying metadata fields#18826

Open
srebhan wants to merge 2 commits intoinfluxdata:masterfrom
srebhan:mongodb_issue_18419
Open

feat(outputs.mongodb): Allow specifying metadata fields#18826
srebhan wants to merge 2 commits intoinfluxdata:masterfrom
srebhan:mongodb_issue_18419

Conversation

@srebhan
Copy link
Copy Markdown
Member

@srebhan srebhan commented Apr 30, 2026

Summary

This PR allows to specify tags to be used as metadata fields. By default, the tags element is used as metadata-field to preserve backward-compatibility with existing setup. However, if a list of metadata fields is given, a new metadata element is created containing the key-value pairs with the matching tags.

Note

The new metadata_keys option accepts wildcards. All tags matching the given list will be added as metadata. If a metadata field does not match a tag it is simply ignored.

Checklist

Related issues

resolves #18419

@srebhan srebhan changed the title Mongodb issue 18419 feat(outputs.mongodb): Allow specifying metadata fields Apr 30, 2026
@telegraf-tiger telegraf-tiger Bot added area/mongodb feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Apr 30, 2026
@srebhan srebhan self-assigned this Apr 30, 2026
@telegraf-tiger
Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/mongodb feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[outputs.mongodb] Allow specifying customize metadata

1 participant