Skip to content

Conversation

@marcschier
Copy link
Collaborator

@marcschier marcschier commented Sep 16, 2025

Proposed changes

Information in the Observability.md markdown inside this PR.

This is part 1, further changes are made once .net standard samples are updated to use this as preview nuget.

Related Issues

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply. You can also fill these out after creating the PR.

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@codecov
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

❌ Patch coverage is 49.28941% with 785 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.64%. Comparing base (8053989) to head (6e394e0).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
Libraries/Opc.Ua.Client/Session/Session.cs 53.84% 95 Missing and 1 partial ⚠️
...raries/Opc.Ua.Configuration/ApplicationInstance.cs 57.57% 55 Missing and 1 partial ⚠️
...ies/Opc.Ua.PubSub/Transport/UdpPubSubConnection.cs 24.52% 40 Missing ⚠️
...braries/Opc.Ua.Client/Subscription/Subscription.cs 58.69% 37 Missing and 1 partial ⚠️
...es/Opc.Ua.PubSub/Transport/MqttPubSubConnection.cs 40.00% 33 Missing ⚠️
Libraries/Opc.Ua.Server/Diagnostics/AuditEvents.cs 0.00% 33 Missing ⚠️
...ibraries/Opc.Ua.Client/Session/TraceableSession.cs 65.93% 31 Missing ⚠️
...pc.Ua.PubSub/Configuration/UaPubSubConfigurator.cs 41.66% 28 Missing ⚠️
...s/Opc.Ua.PubSub/Transport/UdpDiscoveryPublisher.cs 0.00% 28 Missing ⚠️
...ies/Opc.Ua.Server/NodeManager/MasterNodeManager.cs 52.83% 25 Missing ⚠️
... and 58 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3213      +/-   ##
==========================================
+ Coverage   57.55%   57.64%   +0.08%     
==========================================
  Files         356      361       +5     
  Lines       78784    79152     +368     
  Branches    13870    13814      -56     
==========================================
+ Hits        45347    45628     +281     
- Misses      29193    29301     +108     
+ Partials     4244     4223      -21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@romanett romanett left a comment

Choose a reason for hiding this comment

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

Reviewed first 160 files

Copy link
Contributor

@romanett romanett left a comment

Choose a reason for hiding this comment

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

reviewed first 273 files (only test projects missing). Can approve if comments are answered

@@ -533,29 +309,135 @@ public object Clone()
/// <inheritdoc/>
public new object MemberwiseClone()
Copy link
Contributor

@mrsuciu mrsuciu Sep 25, 2025

Choose a reason for hiding this comment

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

As I understand this new MemberwiseClone() will cause the new clone to share the underlying the new ConcurrentDictionary m_encodeableTypes = encodeableFactory.m_encodeableTypes;. Quite a difference in behaviour with the previous implementation. Doesn't the copy-on-write mechanism cause a cloned instance to create a copy only if the cloned instance changes, otherwise a clone shares the changes with the object it has been cloned from if changes have been done on parent ? Maybe this needs a special mention in the document (if assumption is true and not already there). Otherwise great stuff.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it is not immutable. The next change would be to make all of it use an immutable or frozen dictionary and share the pointer at time of clone.

Copy link
Contributor

@mrsuciu mrsuciu left a comment

Choose a reason for hiding this comment

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

Great stuff.

@marcschier marcschier merged commit 8e7a73c into master Sep 25, 2025
123 of 127 checks passed
@marcschier marcschier deleted the obs branch September 25, 2025 18:25
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.

5 participants