DeprecationWarning: Option "tags" of plugin "inputs.opcua" deprecated since version 1.25.0 and will be removed in 1.35.0: use 'default_tags' instead

I started seeing this pop up with the latest version of telegraf:

DeprecationWarning: Option "tags" of plugin "inputs.opcua" deprecated since version 1.25.0 and will be removed in 1.35.0: use 'default_tags' instead

I am defining my nodes using the inline notation like so:

nodes = [
    {name="name",namespace="2",identifier_type="s",identifier="TAG.PATH",tags=[["label1","value1"],["label2","value2"]]},
]

I have unique tags for every entry in the nodes array.

If I switch tags to default_tags like the warning says I get his error that prevents telegraf from starting:

E! loading config file /etc/telegraf_configs/config-2.conf failed: error parsing opcua, line 20: (input.NodeSettings.DefaultTags) cannot unmarshal TOML array into map[string]string (need slice)

Reading through the telegraf opcua input plugin documentation I see this statement:

Inline notation (default_tags not supported yet)

So I guess the toml unmarshling error makes sense. In that case what is the recommended way to apply tags using the inline notation? Is the functionality no longer supported?

I have pretty big telegraf config files (10k - 30k lines each), and if I can’t use the inline notation it will probably quadruple the line count, which feels extreme.

As it says, default_tags is not supported in inline notation. Only way is to not use inline notation then.

Having much lines feels extreme, but telegraf really doesn’t care :wink:

So it seems that removing the tags option is removing a feature (namely the ability to specify tags when using inline notation). Would I be able to convince anyone on the telegraf team to reconsider that deprecation? Or at least put off on removing the ability until default_tags is bought up to parity with the current tags option?

I know telegraf doesn’t care how many lines there are, but having a 1:1 lines to nodes is easier for a human to deal with.

Is far as I can see, its not the default_tags that needs to be put up to parity, but the whole TOML parser used to read and parse the config files.

Does telegraf maintain its own TOML parser? How much work would you estimate it would take to bring it up to parity? I did checkout the TOML spec and maps in maps are valid with the inline syntax.