opentelemetry-js
opentelemetry-js copied to clipboard
ExponentialHistogram has an invalid default param
trafficstars
What happened?
Steps to Reproduce
We got this bug report on the Honeycomb web SDK about a build error with a particularly strict compiler (closurescript).
Reproduction repo: https://github.com/msolli/honeycomb-otel-repro
Expected Result
Closurescript apps can use opentelemetry
Actual Result
Closurescript apps using opentelemetry can't build
Additional Details
I think the problem is here: https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/sdk-metrics/src/aggregator/ExponentialHistogram.ts#L68
Specifically:
export class ExponentialHistogramAccumulation implements Accumulation {
constructor(
public startTime: HrTime = startTime, // startTime is undefined
}
}
OpenTelemetry Setup Code
package.json
Relevant log output
Operating System and Version
No response
Runtime and Version
No response