Skip to content

Commit 711e7b2

Browse files
authored
Fix event type for FunctionMetrics Logs (#9257)
* Fix event type for FunctionMetrics Logs * Change event type in ParseMetricEvents
1 parent 0cf3963 commit 711e7b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/WebJobs.Script.WebHost/Diagnostics/KubernetesEventGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public override void LogFunctionTraceEvent(LogLevel level, string subscriptionId
5151

5252
public override void LogFunctionMetricEvent(string subscriptionId, string appName, string functionName, string eventName, long average, long minimum, long maximum, long count, DateTime eventTimestamp, string data, string runtimeSiteName, string slotName)
5353
{
54-
// Set event type to MS_FUNCTION_LOGS to send these events as part of infra logs.
54+
// Set event type to MS_FUNCTION_METRICS to send these events as part of infra logs.
5555
JObject metricEvent = new JObject();
56-
metricEvent.Add("EventType", ScriptConstants.LinuxLogEventStreamName);
56+
metricEvent.Add("EventType", ScriptConstants.LinuxMetricEventStreamName);
5757
metricEvent.Add("SubscriptionId", subscriptionId);
5858
metricEvent.Add("AppName", appName);
5959
metricEvent.Add("FunctionName", functionName);

test/WebJobs.Script.Tests/Diagnostics/KubernetesEventGeneratorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void ParseMetricEvents(string subscriptionId, string appName, string func
7373

7474
DateTime dt;
7575
Assert.Collection(jObject.Properties(),
76-
p => Assert.Equal(ScriptConstants.LinuxLogEventStreamName, p.Value),
76+
p => Assert.Equal(ScriptConstants.LinuxMetricEventStreamName, p.Value),
7777
p => Assert.Equal(subscriptionId, p.Value),
7878
p => Assert.Equal(appName, p.Value),
7979
p => Assert.Equal(functionName, p.Value),

0 commit comments

Comments
 (0)