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

Fix breaking changes introduced by newest opentelemetry update #152

Conversation

adrianmxb
Copy link

@adrianmxb adrianmxb commented Nov 22, 2021

This PR closes #151 .
I followed through the Upgrade guidelines of opentelemetry-js, some things are looking a bit different.
Should be a good starting point though.

I had to change the spec for the api-metrics middleware test, the .clear() function seems to be missing in the new otel api-metrics spec.

Copy link
Author

@adrianmxb adrianmxb left a comment

Choose a reason for hiding this comment

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

See comment in PR about missing clear method.

const counter = metricService.getValueRecorder('test1');
counter.clear();
const counter = metricService.getHistogram('test1');
// counter.clear();
Copy link
Author

Choose a reason for hiding this comment

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

Clear doesn't exist anymore on histogram

const counter = metricService.getValueRecorder('test1', { description: 'test1 description' });
counter.clear();
const counter = metricService.getHistogram('test1', { description: 'test1 description' });
// counter.clear();
Copy link
Author

Choose a reason for hiding this comment

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

Clear doesn't exist anymore on histogram

@adrianmxb adrianmxb force-pushed the fix/breaking-changes-on-otel-update branch from ae1e68d to 88100e7 Compare November 23, 2021 06:00
@adrianmxb adrianmxb marked this pull request as draft November 23, 2021 06:09
@adrianmxb
Copy link
Author

Converted this to a DRAFT for now, will check if everything works out later.
Was a bit rushed yesterday night.

@adrianmxb adrianmxb changed the title Fix/breaking changes for new otel update (ref: #151) Fix breaking changes introduced by newest opentelemetry update Nov 23, 2021
@pragmaticivan
Copy link
Owner

ping @adrianmxb Do you need any help with this PR?

@adrianmxb
Copy link
Author

@pragmaticivan really stressful week, will look into it hopefully beginning of next week. Got some issues with metrics.

@adrianmxb
Copy link
Author

adrianmxb commented Dec 7, 2021

@pragmaticivan The dependency on opentelemetry-node-metrics seems to be a problem.
The library hasn't adopted the latest opentelemetry-js (@openetelemetry/api-metrics) changes yet, which in turn breaks our host and default metrics.

@pragmaticivan
Copy link
Owner

Hi @adrianmxb I've pushed some changes in the mainstream. I added you as co-author here 6ed63ae

Will only release once https://www.npmjs.com/package/@opentelemetry/host-metrics gets the latest update to 0.27.0

@adrianmxb
Copy link
Author

@pragmaticivan did you see the referenced issue i linked in #151 ?
You should check that out before doing a new release.

@pragmaticivan
Copy link
Owner

pragmaticivan commented Dec 12, 2021

Hi @adrianmxb I'm actually considering dropping this library you commented in order to use https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/opentelemetry-host-metrics only. Which is maintained by open telemetry js team. The reason is that this package doesn't seems to provide types or doesn't actually have versions in the package.

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

Successfully merging this pull request may close these issues.

Package broken with newest opentelemetry dependencies
2 participants