-
Notifications
You must be signed in to change notification settings - Fork 492
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
Added new audit event sub-types #2170
Changes from 2 commits
2423c46
4018dc5
30b2f12
5372a01
1e80e62
02b878b
b8048ef
ceb9283
0b1bbaa
ecd093e
88c93ce
dd200ae
25f372a
9ee34a0
30b2ade
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 |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
using Microsoft.Health.Fhir.Core.Features.Context; | ||
using Microsoft.Health.Fhir.CosmosDb.Features.Metrics; | ||
using Microsoft.Health.Fhir.CosmosDb.Features.Queries; | ||
using Microsoft.Health.Fhir.ValueSets; | ||
|
||
namespace Microsoft.Health.Fhir.CosmosDb.Features.Storage | ||
{ | ||
|
@@ -145,6 +146,7 @@ private async Task AddRequestChargeToFhirRequestContext(double responseRequestCh | |
} | ||
|
||
requestContext.ResponseHeaders[CosmosDbHeaders.RequestCharge] = responseRequestCharge.ToString(CultureInfo.InvariantCulture); | ||
requestContext.RequestHeaders[SpecialValues.CustomAuditHeaderPrefix + CosmosDbHeaders.RequestCharge] = responseRequestCharge.ToString(CultureInfo.InvariantCulture); | ||
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. 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 mean, that collection setup on receiving request, and it's ok (actually not) to modify it while you preparing to process request, but after that, we need to work with response collection. |
||
} | ||
|
||
var cosmosMetrics = new CosmosStorageRequestMetricsNotification(requestContext.AuditEventType, requestContext.ResourceType) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,7 @@ namespace Microsoft.Health.Fhir.ValueSets | |
public static class SpecialValues | ||
{ | ||
public const string System = "http://hl7.org/fhir/special-values"; | ||
|
||
public const string CustomAuditHeaderPrefix = "http://hl7.org/fhir/special-values"; | ||
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. Are you sure? #Closed 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. No :) I just updated the correct value |
||
} | ||
} |
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.
That's not right.
And it's not your fault, but if you touch this code we have chance to make it right.
It's either should be config or it should be const string, it can't be both.
I would suggest to move to away from config to const, for simpicity reasons. #Closed