open-telemetry / open-telemetry/weaver
Support a "regex capture" filter in `weaver_forge`
Open
Nobody has claimed this yet.
enhancement
good first issue
template engine
- Dominant language
- Rust
- Stars
- 486
- Forks
- 108
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 40
Description
A such filter could simplify things like...
...
{%- elif attribute.type == "template[boolean]" %}boolean
{%- elif attribute.type == "template[int]" %}int
{%- elif attribute.type == "template[double]" %}double
{%- elif attribute.type == "template[string]" %}string
{%- elif attribute.type == "template[boolean[]]" %}boolean[]
{%- elif attribute.type == "template[int[]]" %}int[]
{%- elif attribute.type == "template[double[]]" %}double[]
{%- elif attribute.type == "template[string[]]" %}string[]
...
... into
{% set template_captures = regex_captures("template\[(.*)\]") %}
...
{%- elif template_captures | length is ge 1 %}{% template_captures[1] %}
...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the weaver_forge template-filter implementation and reviewing how existing filters are parsed and evaluated. Compare it with the regex_captures example in the issue; done means templates can capture the requested regex groups and use them in the shown conditional pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100