Skip to content

Bug: Multiple addMetrics() calls should not override each other but push more value into the array in EMF #384

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
Tracked by #372
ijemmy opened this issue Jan 3, 2022 · 1 comment · Fixed by #390
Assignees
Labels
bug Something isn't working completed This item is complete and has been merged/shipped metrics This item relates to the Metrics Utility
Milestone

Comments

@ijemmy
Copy link
Contributor

ijemmy commented Jan 3, 2022

This changes should be in:

  1. Code
  2. Unit test
  3. Doc
  4. Example

Example code

metrics.addMetric(name="successfulBooking", unit=MetricUnit.Count, value=1)
metrics.addMetric(name="successfulBooking", unit=MetricUnit.Count, value=2)

Expected result

{
    "_aws": {
        "Timestamp": 1641204548165,
        "CloudWatchMetrics": [
            {
                "Namespace": "DummyNameSpace",
                "Dimensions": [
                    [
                        "service"
                    ]
                ],
                "Metrics": [
                    {
                        "Name": "successfulBooking",
                        "Unit": "Count"
                    }
                ]
            }
        ]
    },
    "service": "Dummy",
    "successfulBooking": [
        1.0,
        2.0
    ]
}
@ijemmy ijemmy changed the title (Jemmy) Multiple metrics (e.g. calling metrics.add_metric(name="successfulBooking", unit=MetricUnit.Count, value=1) should have 2 entries) + doc + unit tests fix(metrics): Multiple add_metrics() calls should not override each other but push more value into the array in EMF Jan 3, 2022
@dreamorosi dreamorosi added this to the beta-release milestone Jan 3, 2022
@dreamorosi dreamorosi added bug Something isn't working metrics This item relates to the Metrics Utility labels Jan 3, 2022
@ijemmy ijemmy changed the title fix(metrics): Multiple add_metrics() calls should not override each other but push more value into the array in EMF fix(metrics): Multiple addMetrics() calls should not override each other but push more value into the array in EMF Jan 3, 2022
@ijemmy ijemmy self-assigned this Jan 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2022

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@dreamorosi dreamorosi added the completed This item is complete and has been merged/shipped label Nov 14, 2022
@dreamorosi dreamorosi changed the title fix(metrics): Multiple addMetrics() calls should not override each other but push more value into the array in EMF Bug: Multiple addMetrics() calls should not override each other but push more value into the array in EMF Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completed This item is complete and has been merged/shipped metrics This item relates to the Metrics Utility
Projects
None yet
2 participants