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

Prometheus histogram is translated to CW MinMaxSumCount with no Min and Max fields populated #575

Closed
vkuzniet opened this issue Jul 7, 2021 · 3 comments
Labels
cloudwatch Cloudwatch related issues metrics Metrics related issue Prometheus Prometheus remote-write related issues

Comments

@vkuzniet
Copy link

vkuzniet commented Jul 7, 2021

Prometheus histogram is translated to CW MinMaxSumCount with no Min and Max fields populated.
I'm emitting a latency metric and it looks in the following way if I call the prometheus endpoint:

stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="1"} 0
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="2"} 0
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="4"} 0
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="8"} 0
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="16"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="32"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="64"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="128"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="256"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="512"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="1024"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="2048"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="4096"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="8192"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="16384"} 1
stargz_fs_operation_duration_bucket{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get",le="+Inf"} 1
stargz_fs_operation_duration_sum{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get"} 11.859904
stargz_fs_operation_duration_count{layer="sha256:c95ee4aba5b02db7bbf46410c26754b42ea8ce1cfbbdc40764f96fc6f044c30b",operation_type="remote_registry_get"} 1

When I look at CW, it's translated to the following:

{
    "_aws": {
        "CloudWatchMetrics": [
            {
                "Namespace": "estargz_snapshotter",
                "Dimensions": [
                    [],
                    [
                        "operation_type"
                    ]
                ],
                "Metrics": [
                    {
                        "Name": "stargz_fs_operation_duration"
                    }
                ]
            }
        ],
        "Timestamp": 1625671999164
    },
    "operation_type": "remote_registry_get",
    "stargz_fs_operation_duration": {
        "Max": 0,
        "Min": 0,
        "Count": 3,
        "Sum": 71.898217
    }
}

I expect that Min and Max are also prefilled with the values based on the histogram buckets the same way as go_gc_duration_seconds:

"go_gc_duration_seconds": {
        "Max": 0.004401447,
        "Min": 0.000026151,
        "Count": 10,
        "Sum": 0.006177569
    },

Please see the the Otel collector config and log attached.

aws-otel-collector.txt

aws-otel-collector.log

@mxiamxia
Copy link
Member

Have you tried it in ADOT v0.11.0 release to see if Min and Max show up as expected?

@vkuzniet
Copy link
Author

vkuzniet commented Jul 13, 2021

This is the version I tried and I didn't get Min and Max show up as expected:

{
  "status": "running",
  "starttime": "2021-07-13T15:46:41+0000",
  "version": "v0.11.0"
}

@alolita alolita added cloudwatch Cloudwatch related issues metrics Metrics related issue Prometheus Prometheus remote-write related issues labels Aug 4, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2022

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the stale label Jan 2, 2022
@alolita alolita removed the stale label Jan 3, 2022
@alolita alolita closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloudwatch Cloudwatch related issues metrics Metrics related issue Prometheus Prometheus remote-write related issues
Projects
None yet
Development

No branches or pull requests

3 participants