Replies: 5 comments 1 reply
-
I've just realized that the This makes this a not so good idea. It might still be useful, but unsure it is worth the extra code from the point of view of the project. That said, if this could be an accepted addition, I'm still willing to implement it. I already went the workaround route in my case. |
Beta Was this translation helpful? Give feedback.
-
What is the exception/problem you're getting in ES when |
Beta Was this translation helpful? Give feedback.
-
For some reason, the value that reaches ES is 9223372036854775808 instead of 9223372036854775807, I was trying to create a runtime field and the script kept failing with:
even though I wasn't even accessing that field, here apparently due to javascript issues the number was even being rounded up. This is not an issue anymore for me, since I took the workaround to ignore that field. And I probably won't use the runtime field. This is the participant with a quick and dirty workaround, just in case someone has this issue in the future: public class IgnoreStartTimeStampAttribute extends TxnSupport {
private static final ObjectMapper MAPPER = Mapper.getMapper();
static {
MAPPER.addMixIn(AbstractHistogram.class, MixIn.class);
}
@Override
public int prepare(long id, Serializable context) {
((Context)context).put(SendResponse.MAPPER, MAPPER);
return PREPARED | NO_JOIN;
}
}
@SuppressWarnings("unused")
abstract class MixIn {
@JsonIgnore abstract long getStartTimeStamp();
} I am trying to use logstash to consume |
Beta Was this translation helpful? Give feedback.
-
Sorry I don't understand your use case. I don't understand when you say "For some reason, the value that reaches ES is ..." how that value gets injected into LogStash/ES. If you want to propose a non breaking PR to the Metrics class, I'm fine evaluating. |
Beta Was this translation helpful? Give feedback.
-
If adding the start date on AbstractHistogram instances makes sense, because this is something that just happens at startup time, I think it's good info to have. Feel free to send a PR if you find it useful. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I'm trying something new here, instead of filling an issue, because this potentially is not, starting a discussion.
This wouldn't be an issue, and it hasn't been until now, if it weren't because of some strange behavior when a long has the
MAX_VALUE
value in Elasticsearch. I know there are other workarounds I can perform, for instance putting a custom mapper in the qrest transaction manager context, .Anyway, the
Metrics
class is not setting thestartTimeStamp
on the histograms and I figure it could be a useful information to have in the histogram object, I see two options here.getHistogram
always set thestartTimeStamp
to current time millis.jPOS/jpos/src/main/java/org/jpos/util/Metrics.java
Lines 59 to 68 in 442aef8
startTimeStamp
on the template on theMetrics
constructor if it is not previously set (in case the caller has some reason for that).I'm inclined to option 2 if this is implemented.
Any thoughts? If agreed I can perform a PR with the implementation.
Beta Was this translation helpful? Give feedback.
All reactions