Comments (6)
AFAIK the API doesn't do/use any inventory data to query a metric endpoint. It's left to the developer to decide how to mix inventory/metric data.
We could add this warning to the Readme or we could add the attribute metric_id
to Hawkular::Inventory::Metric
and set it to metric-id
if provided or id
if not, so the developer wouldn't need to know about this.
// cc @pilhuhn
from hawkular-client-ruby.
@josejulio Yeah, I think the latter is what @jmazzitelli meant. We always populate a field with metric-id or fall back to id.
I wonder (and this is the other side of my comment on the HWKAGENT-78 jira) if we should not just return this metric-id as id if it exists or otherwise the real id.
I see a potential conflict though for this idea: what if we ever want to update the metric definition - how would we then find the real id on which it is required from inventory. I guess we could have a getter "getId" instead of the :id
accessor and make this do the magic. While the update would take the real id, that is still present on the object.
from hawkular-client-ruby.
If is not mandatory for the developer to know the real id of the inventory_metric we could manually implement the attr :id (as getId doesn't seem very ruby-ish) to return the metric_id (if available) so this change would be even more transparent.
In the other hand, if is required for the dev to know the id, replacing it isn't an option and we could have another id (metric_id or native_metric_id, hawkular_metric_id, etc)
from hawkular-client-ruby.
I just commented the following in hwkagent-78, but I will post here too:
Heiko asked "why not directly set the id of the metric definition in inventory to the metric-id here?"
The reason is due to the implementation and how the MeasurementInstance objects are immutable. When the measurement instance IDs are generated, it happens as we build up the Resource using a builder API - this is when we create these instances with our own internal IDs. Once we build the resource, then we pass that instance to our sampling service impl to generate a metric ID and attach it to the measurement instance.
It does not have to work this way. I think we can change the implementation to do something like make the ID mutable and change it - or somehow get the builder to create the ID on the fly somehow. It was just easier implementing it the way it is now. But if this extra "metric-id" property is causing problems and we do not want to have it, we can try to fix it and make it go away.
from hawkular-client-ruby.
Did this ever get fixed? I don't see a related PR documented here.
from hawkular-client-ruby.
Not yet, I've plans on doing it. But haven't setup my env to have a domain eap (and then i'll have to setup a custom metric_id template).
Do you have an environment or config handy ? I'm currently testing with SSl and don't want to do all over again before finishing.
from hawkular-client-ruby.
Related Issues (20)
- Return a more complete operation definition from inventory
- Another gsub does not work on URL issue HOT 8
- List operations sometimes fails
- get operation parameters via the official inventory way
- Add support for rates on query_stats mapping
- Support string metrics
- Allow to list tags in hawkular-metrics HOT 1
- ackBy no longer exists on alerts HOT 1
- Tenant handing in h-metrics 0.20 has changed
- Remove specs context metrics_0_16_ and leave only metric_services and metrics_0_8_0
- Add Test cases for XA Datasource to Datasource Add
- Add 'interval' field of alert conditions
- Add an option to query metrics based on tag only (regardless to type) HOT 2
- Support for multi-tenant operations HOT 6
- @inv_client.create_resource does not return path when resource already exists
- Add support for activesupport gem? HOT 12
- Consider replacing the websocket-client-simple gem with the same gem that is being used in the MiQ HOT 1
- Consider dropping support for v0.8 metrics HOT 5
- hawkular-website-bot's gh token lost the rights to push to the repo
- Incompatible with rest-client 2.1.0.rc1 ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hawkular-client-ruby.