Is it possible to query app insights custom metrics and include the namespace in the result?
The Metrics Explorer provides a dropdown for namespace, but querying the customMetric table in the Log view doesn't seem to provide a column or other way of getting the namespace?
To clarify I am writing metrics to an app insights resource using
TelemetryClient.GetMetric(new MetricIdentifier("namespace","id","dimension")).TrackValue(1,"count");
In the portal, I select the app insights resource, the Monitoring "Blade"? then Metrics. This gives me a drop down selection of namespace with my name spaces listed.
If I select Monitoring, Logs instead I can write KQL against customMetrics table ie
customMetrics | summarize count() by name
What I want to do is (for example)
customMetrics | summarize count() by namespace
Obviously the actual query is more complex, I don't need a way of running that particular query but of accessing the namespace in the same KQL query as the other customMetrics data
Currently namespace is not available as a column under customMetrics in Application Insights Logs. Namespaces are just used as a way to organize metrics so that you can easily find them in Azure Monitor metrics explorer.
The namespace is sent and stored in Azure Monitor as part of Metric Definition object, but unfortunately metric definitions are not exposed in Application Insights Logs. If you are interested in getting the namespace directly from metric definition, then consider using REST API which returns all metric definition fields including namespace (API reference).
However, if you want to work with custom metrics as a log table and have a field for grouping metrics, filtering them or displaying this field in the results, I suggest sending it as custom dimension.
Here is an example of how custom dimensions can be tracked along metric values. I called the dimension metricCategory in this example just to avoid confusion with the standard namespace field:
MetricIdentifier id = new MetricIdentifier("metricNamespace","metricId", "metricCategory");
Metric computersSold = _telemetryClient.GetMetric(id);
computersSold.TrackValue(1,"Namespace/category name");
Then this category can be used in KQL queries as any other custom metric field:
customMetrics | summarize count() by tostring(customDimensions.metricCategory)
You can get Filter out the namespace in an InsightsMetrics. which follows
These are the namespaces in our Log Analytics workspace
If you want to add the custom metrics with namespace you have to add the custom metrics with the specific namespace to retrieve both metrics and namespaces.
Please check the blog to add custom metrics and namespace in application insights and retrieve those accordingly.
Refer here for more information
Related
Situation
I've defined a couple of MDX++ Categories in icCube and I want to use these as Global Filters in the application. An example of a MDX++ Categorie is
create category member [Stats].[Top 100 Leveranciers].[Totaal].[top 100] as
order(TopCount([leverancier].[leverancier].[leverancier],100, [measures].[bedrag]),[measures].[bedrag], bdesc),
add_children=true
If I use this as a Global Filter in the application, all my dashboards are filtered, showing the data for the "Top 100 Leveranciers". Perfect, so far.
Now comes the problem/ question
Some users have a security setting that allows them to see only a subset of the data. The "Top 100 Leveranciers" should therefore be different to them, then to users that can view all the data. But, it is not. The "Top 100 Leveranciers" give exactly the same members for the persons with access to sub-set as to users that can access all.
--> How can I achieve the desired functionality in icCube?
My analysis
This is what I believe is happening 'under-the-hood':
To include a CATEGORY as a global filter option, it has to be defined in the SCHEMA DEFINITION as a SCRIPT. It is only allowed (so far) to have STATIC categories in the script. So I guess I am looking on ways to create CATEGORIES that can be used as global filters, but are DYNAMIC for dashboard users.
Not sure to understand why the Top members are not filtered by the actual user access rights: should be the case. Better to contact icCube support directly.
Here is a quick details about STATIC vs DYNAMIC evaluation of the categories from the online documentation:
STATIC | DYNAMIC : an optional modifier to specify the evaluation context. The default value is DYNAMIC:
in that case, when evaluating the formula the list of members is filtered by the slicer
and/or sub-select content. In STATIC mode, slicer and sub-select are ignored.
am trying to get the value from db without using serviceHub and vault.but i couldn't. what my logic is, when i pass the country name, it should return the id's(PK)of that country which is in one table.using those id's, it should return the values related to those id's from other table.it could be possible in flow class.but am trying to do in api class where servicehub couldn't import. Please help me out.
Only the node has access to the ServiceHub. The API runs outside of the node in a separate process, so it is limited to interacting with the node via the operations offered by CordaRPCOps.
Either you need to store the data you want to access in a separate database outside of the node, or you need to find some way to programatically log into the node's database from the API, using JDBC as described here: https://docs.corda.net/node-database.html.
I'm using the Reporting API v4 and collecting information about Custom Dimensions.
https://developers.google.com/analytics/devguides/reporting/core/dimsmets#view=detail&group=custom_variables_or_columns&jump=ga_dimensionxx
I am able to get dimensions like ga:dateHour but am unable to find a dimension that I can receive the "name". I want to pull in the names "zcode" and "ztest"
described in this picture Custom Dimensions
Am I missing a dimension or metric in this API to achieve this?
Thanks!
The name is used in the reporting interface only. In the API you address custom dimensions by the keyword "dimension" followed by their respective numeric index.
So in your example you would retrieve values for "zcode" by querying "dimension1".
I want to query the google analytics realtime api using one of my custom dimensions.
In the regular api (not realtime) I can do this as follows:
'metrics': 'ga:pageviews',
'filters': 'ga:pagePath=~/myPath*;ga:dimension2=='+myVal
However, when I change the metrics to 'rt:activeUsers', I got the error:
"Unknown dimension(s): ga:dimension2"
when I did the request.
I changed the separator in the filters string from semi-colon to & and I didn't get the error any more, but the result always returns 0
Is it possible to do filtering on the realtime api? TIA
The realtime API does not support custom dimensions (you can see the list of supported dimensions and metrics here). On possible reason is that at least the values for session- and user-scope dimensions cannot be determined in realtime since realtime reports based on hits. So you cannot filter based on a custom dimension.
There is a possible workaround, but that comes with a caveat that makes it mostly pointless. You can create an additional data view, and then use an advanced filter to copy the custom dimension value for the hit to a dimension supported by the realtime API - e.g. you extract the value from your custom dimension and copy it to the "source" field (or some other field). Then you query for/ filte by the source field to retrieve the value. The caveat is that the original value of the source data field (or whatever field you overwrote) will be lost.
I am using the CRM WEB API 2016 v8.1.
I need to filter data based on annotaion property like this one _objectid_value#Microsoft.Dynamics.CRM.lookuplogicalname
Anyone know how to do that or if it is implemented or not?
If i understand you correctly you want to filter data from (for example) a lookup field in a record.
It is possible to filter with a single record.
Example:
GET [Organization URI]/api/data/v8.2/accounts(00000000-0000-0000-0000-000000000001)?$expand=Account_Tasks($filter=endswith(subject,'1');$select=subject)
But it look like it's not yet possible to filter multiple record using $expand
source:
https://msdn.microsoft.com/en-us/library/mt607871.aspx?f=255&MSPPError=-2147217396#bkmk_optionsOnExpand