Skip to content

Telemetry processors bug #3378

Closed
Closed
@ivan-zaitsev

Description

@ivan-zaitsev

Expected behavior

Include filter with non-string value should be correctly applied.

Actual behavior

Currently only string filter fields are supported.

To Reproduce

Create such applicationinsights.json file:

{
    "preview": {
        "processors": [
            {
                "type": "attribute",
                "include": {
                    "matchType": "regexp",
                    "attributes": [
                        {
                            "key": "http.status_code",
                            "value": 400
                        }
                    ]
                },
                "actions": [
                    {
                        "action": "insert",
                        "key": "key",
                        "value": "value"
                    }
                ]
            }
        ]
    }
}

As "http.status_code" is not a string key (AttributeKey.stringKey) but rather long (AttributeKey.longKey), it will not be resolved, and this code will return null instead of actual value.

Object existingAttributeValue = attributes.get(AttributeKey.stringKey(attribute.key));

Same for regexp:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions