Skip to content

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

Closed
@ijemmy

Description

@ijemmy

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
    ]
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompletedThis item is complete and has been merged/shippedmetricsThis item relates to the Metrics Utility

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions