Skip to content

fix: cross-runtime consistency fixes#83

Open
sliedig wants to merge 2 commits intodevelopfrom
cross-runtime-fixes
Open

fix: cross-runtime consistency fixes#83
sliedig wants to merge 2 commits intodevelopfrom
cross-runtime-fixes

Conversation

@sliedig
Copy link
Contributor

@sliedig sliedig commented Mar 16, 2026

Issue number: #82

Summary

Changes

Fixes to align the .NET runtime with Java, Python, and TypeScript for functional equivalence and cross-runtime consistency.

Contracts Service (Unicorn.Contracts)

  • ContractEventHandler.csCreateContractAsync: renamed metric from "NewContracts" to "ContractCreated" to match the canonical metric name used by all other runtimes
  • ContractEventHandler.csUpdateContractAsync: added Metrics.AddMetric("ContractUpdated", 1, MetricUnit.Count, MetricResolution.Standard) after a successful UpdateItemAsync call — the update path previously emitted no custom metric

User experience

Before: Contract creation emitted a NewContracts metric (inconsistent with other runtimes). Contract updates emitted no custom metric at all.

After: Contract creation emits ContractCreated and contract updates emit ContractUpdated, consistent with Java, Python, and TypeScript.

Checklist

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sliedig sliedig requested a review from a team as a code owner March 16, 2026 02:03
@github-actions github-actions bot added the bug Something isn't working label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant