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 scalemonitor descriptor #316

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/DurableTask.Netherite.AzureFunctions/NetheriteProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public override bool TryGetScaleMonitor(
{
if (this.Service.TryGetScalingMonitor(out var monitor))
{
scaleMonitor = new ScaleMonitor(monitor);
scaleMonitor = new ScaleMonitor(monitor, $"{functionId}-{functionName}-{hubName}");
monitor.InformationTracer($"ScaleMonitor Constructed, Descriptor.Id={scaleMonitor.Descriptor.Id}");
return true;
}
Expand All @@ -142,10 +142,11 @@ class ScaleMonitor : IScaleMonitor<NetheriteScaleMetrics>
readonly DataContractSerializer serializer = new DataContractSerializer(typeof(ScalingMonitor.Metrics));
static Tuple<DateTime, NetheriteScaleMetrics> cachedMetrics;

public ScaleMonitor(ScalingMonitor scalingMonitor)
public ScaleMonitor(ScalingMonitor scalingMonitor, string uniqueIdentifier)
{
this.scalingMonitor = scalingMonitor;
this.descriptor = new ScaleMonitorDescriptor($"DurableTaskTrigger-Netherite-{this.scalingMonitor.TaskHubName}".ToLower());
string descriptorString = $"DurableTaskTrigger-Netherite-{uniqueIdentifier}".ToLower();
this.descriptor = new ScaleMonitorDescriptor(descriptorString);
}

public ScaleMonitorDescriptor Descriptor => this.descriptor;
Expand Down
Loading