Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c/core/test: Some metrics do not include timestamps. Possibly a bug in the library? #271

Open
ian-abbott opened this issue Feb 20, 2023 · 0 comments

Comments

@ian-abbott
Copy link
Contributor

In the C test code "c/core/test/test.c", metrics added to the payload by add_simple_metric() have timestamps, but metrics added to the payload by init_metric() followed by add_metric_to_payload() do not have timestamps unless is_historical is true and is_transient is false. That is due to the following code in init_metric() in "tahu.c":

    if (is_historical && !is_transient) {
        metric->has_timestamp = true;
        metric->timestamp = get_current_timestamp();
    }

Is that code correct? I would have thought that the default would be to add a timestamp, but some code adding a historical metric would want to fill in the appropriate time themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant