add isEphemeralContaner to relevant metrics (#22890)
Adds `isEphemeralContainer` as a property to relevant metrics
This commit is contained in:
Родитель
90e51c35a8
Коммит
ff6a3bf1b8
|
@ -434,6 +434,9 @@ export class DeliLambda extends TypedEventEmitter<IDeliLambdaEvents> implements
|
|||
const reprocessOpsMetric = Lumberjack.newLumberMetric(LumberEventName.ReprocessOps);
|
||||
reprocessOpsMetric.setProperties({
|
||||
...getLumberBaseProperties(this.documentId, this.tenantId),
|
||||
[CommonProperties.isEphemeralContainer]:
|
||||
this.sessionMetric?.properties.get(CommonProperties.isEphemeralContainer) ??
|
||||
false,
|
||||
kafkaMessageOffset: rawMessage.offset,
|
||||
databaseLastOffset: this.logOffset,
|
||||
});
|
||||
|
|
|
@ -158,12 +158,14 @@ export class ScribeLambdaFactory
|
|||
}
|
||||
}
|
||||
|
||||
const isEphemeralContainer = document?.isEphemeralContainer;
|
||||
|
||||
scribeSessionMetric = createSessionMetric(
|
||||
tenantId,
|
||||
documentId,
|
||||
LumberEventName.ScribeSessionResult,
|
||||
this.serviceConfiguration,
|
||||
document?.isEphemeralContainer ?? false,
|
||||
isEphemeralContainer,
|
||||
);
|
||||
|
||||
gitManager = await this.tenantManager.getTenantGitManager(tenantId, documentId);
|
||||
|
@ -172,6 +174,7 @@ export class ScribeLambdaFactory
|
|||
documentId,
|
||||
gitManager,
|
||||
this.enableWholeSummaryUpload,
|
||||
isEphemeralContainer,
|
||||
);
|
||||
latestSummary = await summaryReader.readLastSummary();
|
||||
latestSummaryCheckpoint = latestSummary.scribe
|
||||
|
|
|
@ -38,9 +38,13 @@ export class SummaryReader implements ISummaryReader {
|
|||
private readonly documentId: string,
|
||||
private readonly summaryStorage: IGitManager,
|
||||
private readonly enableWholeSummaryUpload: boolean,
|
||||
private readonly isEphemeralContainer: boolean | undefined,
|
||||
private readonly maxRetriesOnError: number = 6,
|
||||
) {
|
||||
this.lumberProperties = getLumberBaseProperties(this.documentId, this.tenantId);
|
||||
this.lumberProperties = {
|
||||
...getLumberBaseProperties(this.documentId, this.tenantId),
|
||||
[CommonProperties.isEphemeralContainer]: this.isEphemeralContainer,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,8 +10,8 @@ import {
|
|||
NackMessagesType,
|
||||
} from "@fluidframework/server-services-core";
|
||||
import {
|
||||
BaseTelemetryProperties,
|
||||
CommonProperties,
|
||||
getLumberBaseProperties,
|
||||
Lumber,
|
||||
LumberEventName,
|
||||
Lumberjack,
|
||||
|
@ -36,8 +36,7 @@ export const createSessionMetric = <T extends string = LumberEventName>(
|
|||
|
||||
const sessionMetric = Lumberjack.newLumberMetric(lumberEventName);
|
||||
sessionMetric?.setProperties({
|
||||
[BaseTelemetryProperties.tenantId]: tenantId,
|
||||
[BaseTelemetryProperties.documentId]: documentId,
|
||||
...getLumberBaseProperties(documentId, tenantId),
|
||||
[CommonProperties.isEphemeralContainer]: isEphemeralContainer,
|
||||
});
|
||||
|
||||
|
|
|
@ -348,6 +348,7 @@ export class LocalOrderer implements IOrderer {
|
|||
this.documentId,
|
||||
this.gitManager,
|
||||
false,
|
||||
this.details.value.isEphemeralContainer,
|
||||
);
|
||||
const latestSummary = await summaryReader.readLastSummary();
|
||||
const summaryWriter = new SummaryWriter(
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
import {
|
||||
BaseTelemetryProperties,
|
||||
CommonProperties,
|
||||
getLumberBaseProperties,
|
||||
LumberEventName,
|
||||
Lumberjack,
|
||||
|
@ -284,8 +285,8 @@ export class CheckpointService implements ICheckpointService {
|
|||
}
|
||||
}
|
||||
restoreFromCheckpointMetric.setProperties({
|
||||
[BaseTelemetryProperties.tenantId]: tenantId,
|
||||
[BaseTelemetryProperties.documentId]: documentId,
|
||||
...getLumberBaseProperties(documentId, tenantId),
|
||||
[CommonProperties.isEphemeralContainer]: document.isEphemeralContainer,
|
||||
service,
|
||||
checkpointSource,
|
||||
retrievedFromLocalDatabase: isLocalCheckpoint,
|
||||
|
|
|
@ -36,6 +36,7 @@ import { toUtf8 } from "@fluidframework/common-utils";
|
|||
import {
|
||||
BaseTelemetryProperties,
|
||||
CommonProperties,
|
||||
getLumberBaseProperties,
|
||||
LumberEventName,
|
||||
Lumberjack,
|
||||
} from "@fluidframework/server-services-telemetry";
|
||||
|
@ -146,12 +147,11 @@ export class DocumentStorage implements IDocumentStorage {
|
|||
|
||||
const storageNameAssignerEnabled = !!this.storageNameAssigner;
|
||||
const lumberjackProperties = {
|
||||
[BaseTelemetryProperties.tenantId]: tenantId,
|
||||
[BaseTelemetryProperties.documentId]: documentId,
|
||||
...getLumberBaseProperties(documentId, tenantId),
|
||||
storageName,
|
||||
enableWholeSummaryUpload: this.enableWholeSummaryUpload,
|
||||
storageNameAssignerExists: storageNameAssignerEnabled,
|
||||
isEphemeralContainer,
|
||||
[CommonProperties.isEphemeralContainer]: isEphemeralContainer,
|
||||
};
|
||||
if (storageNameAssignerEnabled && !storageName) {
|
||||
// Using a warning instead of an error just in case there are some outliers that we don't know about.
|
||||
|
|
Загрузка…
Ссылка в новой задаче