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

Dimensions are not being correctly prefixed #1

Open
CaldwellYSR opened this issue Jun 7, 2018 · 0 comments
Open

Dimensions are not being correctly prefixed #1

CaldwellYSR opened this issue Jun 7, 2018 · 0 comments
Assignees

Comments

@CaldwellYSR
Copy link
Member

Metric data is all prefixed with MetricData.member correctly but dimensions are getting jammed together instead of being prefixed appropriately.

This is the request params that are output from put_metric_data/2

%{
   "Action" => "PutMetricData",
   "MetricData.member.Dimensions.JobsCount" => "Jobs",
   "MetricData.member.MetricName" => "JobsCount",
   "MetricData.member.Unit" => "Count",
   "MetricData.member.Value" => 0,
   "Namespace" => "Dev/Jobs",
   "Version" => "2010-08-01"
 }

These are the expected params from the docs

https://monitoring.&api-domain;/doc/2010-08-01/
?Action=PutMetricData
&Version=2010-08-01
&Namespace=TestNamespace
&MetricData.member.1.MetricName=buffers
&MetricData.member.1.Unit=Bytes
&MetricData.member.1.Value=231434333
&MetricData.member.1.Dimensions.member.1.Name=InstanceType
&MetricData.member.1.Dimensions.member.1.Value=m1.small
&AUTHPARAMS

So the dimensions need to be split between name and value and need their own prefix of Dimensions.member.Name and Dimensions.member.Value

@CaldwellYSR CaldwellYSR self-assigned this Jun 7, 2018
CaldwellYSR pushed a commit that referenced this issue Jun 7, 2018
`format_param/1` was not working correctly for nested fields. Each field
was being prefixed with MetricData.member but the inner fields were not
getting their specific prefixes. This caused dimensions to not be sent
correctly.

This fixes #1
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

1 participant