-
Notifications
You must be signed in to change notification settings - Fork 12
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
Buddhi metric reporter service api #6
Conversation
Simple profile generated traffic pattern was different from saas profile's Generate same traffic url pattern no matter traffic profile
… based on traffic paths
…reporter unittests
buddhi/README.md
Outdated
$ curl -X POST --data-binary "@traffic.csv" http://127.0.0.1:8089/report/amp 2>/dev/null | jq '.' | ||
{ | ||
"metrics": { | ||
"24b08f30-403e-4be7-83d8-984d6e93b91a": 7, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A metric ID by itself does not identify a metric. It also needs the service ID.
If I remember correctly, Apisonator will let you create 2 different metrics with the same ID under different services.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct,
What format would be appropriate?
{
"svc_a":{
"metric_a_1": 3,
"metric_a_2": 6,
"metric_a_3": 8,
}
},
"svc_b":{
"metric_b_1": 1,
"metric_b_2": 2,
"metric_b_3": 7,
}
}
}
or CSV
"service", "metric", "counter"
"svc_a", "metric_a_1", 5
"svc_a", "metric_a_2", 5
"svc_a", "metric_a_3", 5
"svc_b", "metric_b_1", 5
"svc_b", "metric_b_2", 5
"svc_b", "metric_b_3", 5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd return JSON in this case because it allows us to represent the service -> metric
relationships
d6fe655
to
ec47a71
Compare
@davidor updated response body format to
|
Metric reporter endpoint computes expected metric usage from traffic information.
Buddhi knows relation between traffic paths and metric hits. Using that relation, metric usage report is generated based on traffic information.
Traffic information can be generated using
/paths/amp
endpoint as follows:Then, metric report can be generated requesting
/report/amp
endpoint as follows:Report shows usage for every metric involved in traffic. Pretty printed
Additionally, traffic path template from
single
traffic profile has been removed. Removing specific traffic path template forsingle
profile, now, there is only one traffic path template for all traffic profiles based on/[1]{0..3}
template.