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

Type 'Span' is missing the following properties from type 'Span': addLink, addLinks #1370

Closed
gunzip opened this issue Aug 19, 2024 · 6 comments

Comments

@gunzip
Copy link

gunzip commented Aug 19, 2024

It looks like there's a mismatch between the version of these packages:

@opentelemetry/api@^1.9.0
@opentelemetry/sdk-trace-base@^1.24.0

I get this error when building:

Type 'Span' is missing the following properties from type 'Span': addLink, addLinks

as the implementation here: https://github.com/open-telemetry/opentelemetry-js/blob/v1.24.0/packages/opentelemetry-sdk-trace-base/src/Span.ts#L57 misses addLink(s) methods, a breaking change as stated into the CHANGELOG:

https://github.com/open-telemetry/opentelemetry-js/blob/main/api/CHANGELOG.md#190

feat(api): allow adding span links after span creation open-telemetry/opentelemetry-js#4536 @seemk
This change is non-breaking for end-users, but breaking for Trace SDK implmentations in accordance with the specification as new features need to be implemented.

@JacksonWeber
Copy link
Contributor

@gunzip Thank you for this catch. We'll update the appropriate OTel deps in the App Insights v3 project as they're out of sync with the dependency on the @azure/monitor-opentelemetry project.

@JacksonWeber
Copy link
Contributor

@gunzip Fixed here: #1371 and tested building with TypeScript.

@gunzip
Copy link
Author

gunzip commented Aug 20, 2024

Thank you @JacksonWeber! Are you gonna align the azure/functions package as well? I see monitor-opentelemetry uses 4.x

https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/monitor/monitor-opentelemetry/package.json#L67

@JacksonWeber
Copy link
Contributor

@gunzip v4 of Azure Functions is supported in the distro at the moment, but there's further work to do to also support in App Insights 3.x SDK. I can work on that and should be able to support it by the time of the next release.

@JacksonWeber
Copy link
Contributor

@gunzip the above PR should resolve your issue. Let me know and we can close this issue.

@gunzip
Copy link
Author

gunzip commented Oct 9, 2024

Yes, solved now!

@gunzip gunzip closed this as completed Oct 9, 2024
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

No branches or pull requests

2 participants