简体   繁体   English

为发送到 New Relic 的自定义事件创建带有自定义时间戳的时间序列图表

[英]Create Timeseries chart with custom timestamp for custom events sent to New Relic

I have some custom load test data, something like -我有一些自定义负载测试数据,比如 -

{“payload_size”: 15, “response_time”: 0.2, “timestamp”: 1670584754} {“payload_size”:15,“response_time”:0.2,“timestamp”:1670584754}

So i wanted to plot payload_size against timestamp as a timeseries chart, but the issue is I am sending all of this data in bulk, which may include 600 events like this (if ran for 10 minutes).所以我想将 plot payload_size 与时间戳作为时间序列图表,但问题是我批量发送所有这些数据,其中可能包括 600 个这样的事件(如果运行 10 分钟)。

So when i do timeseries, it shows me one entry only as all the data is pushed at simple point of time.所以当我做时间序列时,它只显示一个条目,因为所有数据都是在简单的时间点推送的。 Is there a workaround for this.有没有解决方法。 I am using EventAPI to send all the data.我正在使用 EventAPI 发送所有数据。

Yes - you can do this with New Relic's custom visualizations是的——您可以使用 New Relic 的自定义可视化来做到这一点

I wrote one specifically for this same use case here: https://github.com/khpeet/custom-timeseries我在这里专门为同一个用例写了一个: https://github.com/khpeet/custom-timeseries

This allows you to plot your values on a timeseries chart with your own custom timestamp field.这允许您使用自己的自定义时间戳字段在时间序列图表上 plot 您的值。 Note that timestamp is a reserved word in New Relic though, so you probably have to rename your timestamp key to something else upon posting the events via API.请注意, timestamp是 New Relic 中的保留字,因此您可能必须在通过 API 发布事件时将时间戳键重命名为其他名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM