-
Notifications
You must be signed in to change notification settings - Fork 273
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
Minimize telemetry surface area #2844
Changes from 1 commit
94a1f2c
a56cf6d
ffdd81c
17dceeb
ba345d1
77ebaa6
e1e865c
6bd3a33
95bcd87
dbd62d2
1ea40e3
a43292c
e4fab7a
39f400e
80f6a09
d3103fe
1fe4e67
caf746e
10ac5a9
900b1a2
032f566
f31cad9
43f63fc
f30f622
b1ec95d
de2e41c
73fed6e
e16b912
8ed5d30
5d15568
778cecd
bac3b33
2af6b47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
using System; | ||
using System.Diagnostics; | ||
using System.Net; | ||
using DurableTask.Core.Common; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Microsoft.Azure.WebJobs.Extensions.DurableTask | ||
|
@@ -140,7 +141,6 @@ public void FunctionStarting( | |
functionName, | ||
taskEventId, | ||
instanceId, | ||
input, | ||
functionType.ToString(), | ||
ExtensionVersion, | ||
isReplay); | ||
|
@@ -226,7 +226,6 @@ public void FunctionCompleted( | |
functionName, | ||
taskEventId, | ||
instanceId, | ||
output, | ||
continuedAsNew, | ||
functionType.ToString(), | ||
ExtensionVersion, | ||
|
@@ -239,26 +238,6 @@ public void FunctionCompleted( | |
} | ||
} | ||
|
||
public void ProcessingOutOfProcPayload( | ||
string functionName, | ||
string taskHub, | ||
string instanceId, | ||
string details) | ||
{ | ||
EtwEventSource.Instance.ProcessingOutOfProcPayload( | ||
functionName, | ||
taskHub, | ||
LocalAppName, | ||
LocalSlotName, | ||
instanceId, | ||
details, | ||
ExtensionVersion); | ||
|
||
this.logger.LogDebug( | ||
"{instanceId}: Function '{functionName} ({functionType})' returned the following OOProc orchestration state: {details}. : {hubName}. AppName: {appName}. SlotName: {slotName}. ExtensionVersion: {extensionVersion}. SequenceNumber: {sequenceNumber}.", | ||
instanceId, functionName, FunctionType.Orchestrator, details, taskHub, LocalAppName, LocalSlotName, ExtensionVersion, this.sequenceNumber++); | ||
} | ||
|
||
public void FunctionTerminated( | ||
string hubName, | ||
string functionName, | ||
|
@@ -273,7 +252,6 @@ public void FunctionTerminated( | |
LocalSlotName, | ||
functionName, | ||
instanceId, | ||
reason, | ||
functionType.ToString(), | ||
ExtensionVersion, | ||
IsReplay: false); | ||
|
@@ -298,7 +276,6 @@ public void SuspendingOrchestration( | |
LocalSlotName, | ||
functionName, | ||
instanceId, | ||
reason, | ||
functionType.ToString(), | ||
ExtensionVersion, | ||
IsReplay: false); | ||
|
@@ -323,7 +300,6 @@ public void ResumingOrchestration( | |
LocalSlotName, | ||
functionName, | ||
instanceId, | ||
reason, | ||
functionType.ToString(), | ||
ExtensionVersion, | ||
IsReplay: false); | ||
|
@@ -348,7 +324,6 @@ public void FunctionRewound( | |
LocalSlotName, | ||
functionName, | ||
instanceId, | ||
reason, | ||
functionType.ToString(), | ||
ExtensionVersion, | ||
IsReplay: false); | ||
|
@@ -364,6 +339,7 @@ public void FunctionFailed( | |
string functionName, | ||
string instanceId, | ||
string reason, | ||
string sanitizedReason, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right. Throughout this PR, we only sanitize the logs to So I'm choosing to delay our decision to sanitize the FunctionsLogs for now so that we can unblock sanitizing the DF Kusto table. Does that seem reasonable? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, thanks for clarifying. It would be good to confirm what the plan is for sanitizing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's discuss this offline. But in general I think the clean up done here is unlikely to need to be reversed. If anything, I think it's more likely that it will need to be expanded to include FunctionsLogs as well. I'm just opting to merge a minimal improvement for now. |
||
FunctionType functionType, | ||
bool isReplay, | ||
int taskEventId = -1) | ||
|
@@ -377,7 +353,7 @@ public void FunctionFailed( | |
functionName, | ||
taskEventId, | ||
instanceId, | ||
reason, | ||
sanitizedReason, | ||
functionType.ToString(), | ||
ExtensionVersion, | ||
isReplay); | ||
|
@@ -389,6 +365,19 @@ public void FunctionFailed( | |
} | ||
} | ||
|
||
public void FunctionFailed( | ||
string hubName, | ||
string functionName, | ||
string instanceId, | ||
Exception reason, | ||
FunctionType functionType, | ||
bool isReplay, | ||
int taskEventId = -1) | ||
{ | ||
string sanitizedException = $"{reason.GetType().FullName}\n{reason.StackTrace}"; | ||
this.FunctionFailed(hubName, functionName, instanceId, reason.ToString(), sanitizedException, functionType, isReplay, taskEventId); | ||
} | ||
|
||
public void FunctionAborted( | ||
string hubName, | ||
string functionName, | ||
|
@@ -434,8 +423,6 @@ public void OperationCompleted( | |
instanceId, | ||
operationId, | ||
operationName, | ||
input, | ||
output, | ||
duration, | ||
FunctionType.Entity.ToString(), | ||
ExtensionVersion, | ||
|
@@ -456,6 +443,7 @@ public void OperationFailed( | |
string operationName, | ||
string input, | ||
string exception, | ||
string sanitizedException, | ||
double duration, | ||
bool isReplay) | ||
{ | ||
|
@@ -469,7 +457,6 @@ public void OperationFailed( | |
instanceId, | ||
operationId, | ||
operationName, | ||
input, | ||
exception, | ||
duration, | ||
FunctionType.Entity.ToString(), | ||
|
@@ -483,12 +470,26 @@ public void OperationFailed( | |
} | ||
} | ||
|
||
public void OperationFailed( | ||
string hubName, | ||
string functionName, | ||
string instanceId, | ||
string operationId, | ||
string operationName, | ||
string input, | ||
Exception exception, | ||
double duration, | ||
bool isReplay) | ||
{ | ||
string sanitizedException = $"{exception.GetType().FullName}\n{exception.StackTrace}"; | ||
this.OperationFailed(hubName, functionName, instanceId, operationId, operationName, input, exception.ToString(), sanitizedException, duration, isReplay); | ||
} | ||
|
||
public void ExternalEventRaised( | ||
string hubName, | ||
string functionName, | ||
string instanceId, | ||
string eventName, | ||
string input, | ||
bool isReplay) | ||
{ | ||
if (this.ShouldLogEvent(isReplay)) | ||
|
@@ -502,7 +503,6 @@ public void ExternalEventRaised( | |
functionName, | ||
instanceId, | ||
eventName, | ||
input, | ||
functionType.ToString(), | ||
ExtensionVersion, | ||
isReplay); | ||
|
@@ -605,7 +605,6 @@ public void EntityResponseReceived( | |
FunctionType functionType, | ||
string instanceId, | ||
string operationId, | ||
string result, | ||
bool isReplay) | ||
{ | ||
if (this.ShouldLogEvent(isReplay)) | ||
|
@@ -617,7 +616,6 @@ public void EntityResponseReceived( | |
functionName, | ||
instanceId, | ||
operationId, | ||
result, | ||
functionType.ToString(), | ||
ExtensionVersion, | ||
isReplay); | ||
|
@@ -806,9 +804,11 @@ public void EntityBatchFailed( | |
string functionName, | ||
string instanceId, | ||
string traceFlags, | ||
string details) | ||
Exception error) | ||
{ | ||
FunctionType functionType = FunctionType.Entity; | ||
string details = Utils.IsFatal(error) ? error.GetType().Name : error.ToString(); | ||
string sanitizedDetails = $"{error.GetType().FullName}\n{error.StackTrace}"; | ||
|
||
EtwEventSource.Instance.EntityBatchFailed( | ||
hubName, | ||
|
@@ -817,7 +817,7 @@ public void EntityBatchFailed( | |
functionName, | ||
instanceId, | ||
traceFlags, | ||
details, | ||
sanitizedDetails, | ||
functionType.ToString(), | ||
ExtensionVersion); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this wasn't used