If I would like to have some custom counters (let's say numbers), how would that be represented in the context of Elastic APM?
Unless I overlooked the REST API, seems like there is no way to add custom fields. The closest I can think of is to use Tags, but the value field is String type though. I would like to graph the counters, so String isn't good for me.
Can you please give an example of what sort of counters you want to report? We're looking into providing an API for applications to report metrics, but I'm not sure if it's what you're asking for.
We would like generate graphs from these counters too. For instance, how many files open in the last hour, etc. Basically any custom domain/application specific metrics that didn't fit into the "span" model. To my understanding, the Span model is more suitable for timing things.
We are heavy on C# and acknowledged that there isn't a C# agent yet. We are considering to make use of the REST API from the APM Server to gather our performance metrics (timing data and counters).
Custom counters are important to us. Would you please clarify whether we can do custom counters with the current RESP APIs? If so, an example would be great. If not, any other workaround or suggestions?
Number of get/post/put requests
Number of files currently opened
Number of running threads
Number of misses from cache
The first one should be answerable using HTTP request transaction data, since the schema includes the HTTP method. Of course, in your case that assumes a C# agent exists, which as you know is not currently the case.
As for the rest: we're working on it, but there's currently no API for transmitting application metrics.
We would like generate graphs from these counters too. For instance, how many files open in the last hour, etc. Basically any custom domain/application specific metrics that didn't fit into the "span" model. To my understanding, the Span model is more suitable for timing things.
Graphs will definitely be considered important. The current thinking is that these metrics (custom counters, etc.) will be consumed using Kibana's Time Series Visual Builder.
We are heavy on C# and acknowledged that there isn't a C# agent yet. We are considering to make use of the REST API from the APM Server to gather our performance metrics (timing data and counters).
Custom counters are important to us. Would you please clarify whether we can do custom counters with the current RESP APIs? If so, an example would be great. If not, any other workaround or suggestions?
As mentioned above, currently there is no support for metrics beyond what you get from transaction/span data, but we'll be working on it. Custom/application-specific counters shouldn't be a problem.
Given that there's no API in APM for this yet, I'd suggest that in the interim, consider feeding the counters into Elasticsearch by some other means, e.g.:
Thanks again Andrew for the prompt reply. It's clear to me what's the current status of the APM APIs and what's in your roadmap regarding custom counters. Very glad that you guys will be working on this.
Looking at the pre-alpha Java agent, as a temporary workaround, do you think we can make use of the Tags for custom counters?
For instance, we are considering tags like the following to represent a single counter:
counterId: numActiveThreads
numActiveThreads: 13
Reason to split up into 2 tags, instead of numActiveThreads: 13, is to help converting the string value to number (or adding new field) with a elasticsearch pipeline (since tag only supports string value).
Once we can ingest tag values as numbers then we can visualize them in Kibana. Do you think this will work? Do you see any other possible downside with this temporary solution?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.