Skip to content
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

Feature enhancement: Create a Subsegments for operations handled by Powertools #1505

Open
mriccia opened this issue Nov 8, 2023 · 5 comments
Labels
enhancement New feature or request priority:4 Low - nice to have v2 Version 2
Milestone

Comments

@mriccia
Copy link
Contributor

mriccia commented Nov 8, 2023

Is your feature request related to a problem? Please describe.

When using the idempotency module with Tracing: Active, it is not possible to see from the Trace how much time was spent inside Powertools code.
Adding a subsegment will make it easier to correlate the DynamoDB SDK calls, with the Idempotency functionality from Powertools.

Describe the solution you'd like

I would like an XRay subsegment to be created to show how long it's spent inside the Idempotency code.
This is an initial idea for discussion/consideration, it could be further expanded to other Powertools functionality.

@jeromevdl
Copy link
Contributor

jeromevdl commented Nov 8, 2023

Good idea but the idempotency module works before and after the handler method is actually executed.
Should we add 2 segments?

  • One before when we check in the DB if the idempotency key is already there or insert it
  • One after when we update the record

@jeromevdl
Copy link
Contributor

jeromevdl commented Nov 8, 2023

Also, we may have a "dependency" issue. This should happen only if tracing is enabled / powertools-tracing is used. But we don't want to add a (maven) dependency to xray / powertools-tracing in the idempotency module...

@jeromevdl jeromevdl added enhancement New feature or request v2 Version 2 priority:4 Low - nice to have and removed triage labels Nov 8, 2023
@jeromevdl
Copy link
Contributor

Let's do this in v2

@scottgerring
Copy link
Contributor

Idempotency isn't the only module that calls AWS services. Do we want to add it to everything (e.g. the various params?)

Also, we may have a "dependency" issue. This should happen only if tracing is enabled / powertools-tracing is used. But we don't want to add a (maven) dependency to xray / powertools-tracing in the idempotency module...

This will be the trick.

@scottgerring
Copy link
Contributor

@heitorlessa wdyt?

@scottgerring scottgerring added this to the v2 milestone Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:4 Low - nice to have v2 Version 2
Projects
Status: Triage
Development

No branches or pull requests

3 participants