跟踪企业中使用自定义 java 函数的用户数量

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

我们开发了一个常用的函数,打包成一个jar,可以在Nexus上使用。

不同的团队正在下载我们的 jar 并在他们的项目中使用我们的常用功能。

要求是 我们想知道有多少 users/projects 调用了我们的常用函数。 注意 - 不公开为 API,公开为 jar 任何实现此目的的方法。

感谢您的帮助。

假设有日志生成。

您可以使用 Logstash 来使用您的日志并推送到 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

在 Elastic Search 中,您可以非常灵活地聚合数据来计算我们有多少人在使用您的功能

https://www.elastic.co/

您也可以查看 Kibana 以直观地表示此类数据。

======已编辑========== 在最简单的形式中,您将能够发现:

  • 项目 A 正在调用函数 A()
  • 项目 B 正在调用函数 A() 和函数 B()

除非您记录此类信息,否则您将无法分辨是哪个 用户

这完全取决于您正在记录的内容、logstash 将要解析并推送到 Elastic Search 中的内容。