Skip to content

feat: Support for Boolean and Number type as value in TracingUtils putAnnotation #421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dmahapatro opened this issue Jun 9, 2021 · 1 comment

Comments

@dmahapatro
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I came across a minor feature missing in TracingUtils. XRay SDK supports recording annotations as:

  • Keys – Up to 500 alphanumeric characters. No spaces or symbols except underscores.
  • Values – Up to 1,000 Unicode characters.

With key being a string and value can be a Boolean, Number, or String value.

However, TracingUtils just supports value as String, there is no support for Number, Boolean.

Describe the solution you'd like
Adding support for Number & Boolean like:

public static void putAnnotation(String key, Number value) {
  AWSXRay.getCurrentSubsegmentOptional()
    .ifPresent(segment -> segment.putAnnotation(key, value));
}

Describe alternatives you've considered
This is not a blocker because I can use String.valueOf(myIntValue)

Additional context

@pankajagrawal16
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants