Possible incorrect type in HostMetrics #2274
Labels
bug
Something isn't working
pkg:host-metrics
priority:p4
Bugs and spec inconsistencies which do not fall into a higher prioritization
What version of OpenTelemetry are you using?
@opentelemetry/host-metrics@0.35.2
What version of Node are you using?
20.10.0
What did you do?
In an app with TypeScript type checking, I'm doing the following:
What did you expect to see?
I expected to see no type errors as the
name
option ofHostMetrics
is defaulted in the base class here.What did you see instead?
I get a type error:
This is because the
MetricsCollectorConfig
type does not specify thatname
is optional (see here).Additional context
I'd be happy with any of the following:
name
is optional. If so, then should the entire config object be optional too?name
isn't defaulted, possibly throwing an error if name is not configuredThe text was updated successfully, but these errors were encountered: