Search code examples
javaelasticsearchlogginglogstashnewrelic

Track the number of users using the custom java function in an enterprise


We have developed a common functions packaged as a jar and available at the Nexus .

Different teams are downloading our jar and using our common functions in their project .

Requirement is We want to know who many users/projects are calling our common functions. Note - not exposed as APIs, exposed as jar Any way to achieve this.

Your help is appreciated.


Solution

  • Assuming there are logs generated.

    You could use Logstash to consume your logs and push into Elastic Search.

    Logstash dynamically ingests, transforms, and ships your data regardless of format or complexity. Derive structure from unstructured data with grok, decipher geo coordinates from IP addresses, anonymize or exclude sensitive fields, and ease overall processing.

    https://www.elastic.co/logstash

    From Elastic Search, you have a lot of flexibility in how you aggregate data to figure our how many are using your function

    https://www.elastic.co/

    You can look into Kibana for visual representation of such data as well.

    ====== Edited ========== In its simplest form, you will be able to find out:

    • Project A is calling functionA()
    • Project B is calling functionA(), and functionB()

    You will not be able to tell which User, unless you are logging such information.

    This all depends on what you are logging, what logstash is going to be parsing and pushing into Elastic Search.