Skip to content

warn on missing unit for duration/size config vars, require unit on new config vars #2121

@trentm

Description

@trentm

There was a discussion recently and suggestion from @felixbarny that the APM agents make the units on time/duration config vars (e.g. metricsInterval) required instead of optional. The history there is that some Java agent config vars that were later shared with other agents (e.g. span_frames_min_duration) used to have the units in the name (e.g. span_frames_min_duration_ms). The switch to drop the units in the name added support for units in the value, but for backward compatibility supported default units.

The problem: There are some cases where the user can get surprised:

  • different default units between agents (e.g. the recently added spanFramesMinDuration in the node.js agent defaults to seconds with no units, but the default is milliseconds for other agents)
  • the default units are not obvious to the user doing the configuration

Making the units required is obviously a breaking change, so would need to wait for a major version bump.

(See also the related #2120 for handling invalid config values.)

Metadata

Metadata

Assignees

Labels

agent-nodejsMake available for APM Agents project planning.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions