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

feat(inputs.statsd): Add optional temporality and start_time tag for statsd metrics #13087

Merged
merged 3 commits into from
May 2, 2023

Conversation

povilasv
Copy link
Contributor

@povilasv povilasv commented Apr 14, 2023

Required for all PRs

Ref #12507

The idea here is to allow users to optionally configure aggregation_temporality feature.
It will enable:

  • temporality tag based on the Telegraf configuration.
  • start_time tag to gather information when the accumulation of metrics started, while metric time will contain finish time. So when using OTLP we always send [start_time, metric_time) intervals.

Also draft PR in the library that would make use of temporality tag and start_time tags

influxdata/influxdb-observability#160

resolves #

@Hipska Hipska added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin area/statsd plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Apr 14, 2023
@povilasv povilasv force-pushed the statsd-temporality2 branch 3 times, most recently from f1f8cf1 to 931ded5 Compare April 25, 2023 09:45
@povilasv povilasv changed the title add temporality and start_time tag for statsd metrics feat: add optional temporality and start_time tag for statsd metrics Apr 25, 2023
@povilasv povilasv marked this pull request as ready for review April 25, 2023 11:00
Comment on lines 59 to 63
## Enable start_time field, which adds the start time of the metric accumulation
## You should use this together with enable_temporality_tag when using OpenTelemetry output.
enable_start_time_field = false
## Enable temporality tag adds temporality=delta or temporality=commulative tag to the metrics.
enable_temporality_tag = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern is that a user would need to know they need both of these enabled if they want to start tracking delta metrics.

What do you think about a user-facing setting like: temporality = ""

And if it is empty, current behavior happens, if set to delta it would add the time field and tag temporality='delta' and if set to commulative then only the tag temporality='commulative'

Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do that. Maybe enable_aggregation_temporality = true. We would then start adding temporality tag based on delete_counters argument and start passing the start time?

Copy link
Contributor Author

@povilasv povilasv Apr 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the PR to do this ⬆️

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you! two inline suggestions about commenting out the default value of a config option and then I'm +1

plugins/inputs/statsd/README.md Outdated Show resolved Hide resolved
plugins/inputs/statsd/sample.conf Outdated Show resolved Hide resolved
@powersj powersj added the waiting for response waiting for response from contributor label Apr 25, 2023
@telegraf-tiger
Copy link
Contributor

@povilasv
Copy link
Contributor Author

povilasv commented May 2, 2023

gentle ping @srebhan and also maybe @jacobmarble could you take a look, since next PR is for influxdata/influxdb-observability#160 ? :)

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label May 2, 2023
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Sorry for the late response @povilasv!

@srebhan srebhan changed the title feat: add optional temporality and start_time tag for statsd metrics feat(inputs.statsd): Add optional temporality and start_time tag for statsd metrics May 2, 2023
@srebhan srebhan merged commit 92b6d96 into influxdata:master May 2, 2023
@povilasv
Copy link
Contributor Author

povilasv commented May 3, 2023

Thanks!

@povilasv povilasv deleted the statsd-temporality2 branch May 3, 2023 07:34
@srebhan srebhan added this to the v1.27.0 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/statsd feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants