aws / aws/aws-xray-sdk-java

DynamicSegmentNamingStrategy to support RegEx

Open
#118 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
100
Forks
100
PR merge metrics
No merged PRs in 30d

Description

The current dynamicNamingRecognizedHosts parameter supports * as global match.
In our situation, a regular expression would be best.

This enhancement is easy to implement:
In class DynamicSegmentNamingStrategy allow the parameter recognizedHosts to contain a regular expression Java script style, e.g. /.*\.((app)|(us))/ (accepting all hosts with .us or .app)

if (recognizedHosts.startsWith("/") && recognizedHosts.endsWith("/")
- compile expression -if success and match return hostHeaderValue else fallbackName

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.