Skip to content

Latest commit

 

History

History
230 lines (166 loc) · 11.4 KB

telemetry-pte-upload-validation-trace.md

File metadata and controls

230 lines (166 loc) · 11.4 KB
title description author ms.author ms.reviewer ms.topic ms.date ms.custom
Analyzing Extension Upload Validation Telemetry
Learn about the extension upload validation telemetry in Business Central.
KennieNP
kepontop
jswymer
conceptual
11/03/2023
bap-template

Analyzing Extension Upload Validation Telemetry

[!INCLUDEcomponent]

[!INCLUDEazure-ad-to-microsoft-entra-id]

In the [!INCLUDEprod_short] service, when a user/administrator uploads a per-tenant extension to an environment from the Extension Management page, we proactively validate it against the environment.

With this telemetry, partners can monitor these attempts for customers and setup alerts on failures so that they know up-front which customers will need help.

Failed operations result in a trace log entry that includes a reason for the failure.

The validation flow is as follows:

The PTE submission validation flow is as follows:

PTE submission validation request started (LC0200). This includes the main extension to be validated and a list of extensions it depends on.
For each extension (main + dependent extensions)
        Extension validation started (LC0204)

        Either 
                Extension validation completed successfully (LC0205)
        or
                Validation diagnostic reported (LC0210)
                Extension validation completed with failures (LC0206)

Then either 
        PTE submission validation request completed successfully (LC0202)
or
        PTE submission validation request completed with failures (LC0203)

Per-tenant extension (PTE) validation started (LC0200)

Occurs when a new per-tenant extension (PTE) validation attempt is started on the environment.

General dimensions

Dimension Description or value
message PTE validation started: request {submissionId}

{submissionId} indicates the identifier for the validation attempt.

Custom dimensions

Dimension Description or value
eventId LC0200
environmentId [!INCLUDEaadTenantId]
environmentName [!INCLUDEenvironmentName]
environmentType [!INCLUDEenvironmentType]
mainExtension A json structure that contains information about the extension that is being uploaded.
submissionOperationId [!INCLUDEsubmissionOperationId]

Extension validation started (LC0204)

Occurs for each extension in the upload.

General dimensions

Dimension Description or value
message Extension validation started: extension {extensionName} version {extensionVersion} by {extensionPublisher} ({extensionId})

{extensionName} indicates the name of the extension.

{extensionVersion} indicates the version of the extension.

{extensionPublisher} indicates the publisher of the extension.

{extensionId} indicates the id of the extension.

Custom dimensions

Dimension Description or value
eventId LC0204
environmentId [!INCLUDEaadTenantId]
environmentName [!INCLUDEenvironmentName]
environmentType [!INCLUDEenvironmentType]
extensionName Specifies the name of the extension that was to be validated.
extensionId [!INCLUDEextensionId]
extensionPublisher [!INCLUDEextensionPublisher]
extensionVersion [!INCLUDEextensionPublisher]
submissionOperationId [!INCLUDEsubmissionOperationId]

Extension validation completed successfully (LC0205)

Occurs if the extension can compile against the environment.

General dimensions

Dimension Description or value
message Extension validation completed successfully: extension {extensionName} version {extensionVersion} by {extensionPublisher} ({extensionId})

{extensionName} indicates the name of the extension.

{extensionVersion} indicates the version of the extension.

{extensionPublisher} indicates the publisher of the extension.

{extensionId} indicates the id of the extension.

Custom dimensions

Dimension Description or value
eventId LC0205
environmentId [!INCLUDEaadTenantId]
environmentName [!INCLUDEenvironmentName]
environmentType [!INCLUDEenvironmentType]
extensionName Specifies the name of the extension that was to be validated.
extensionId [!INCLUDEextensionId]
extensionPublisher [!INCLUDEextensionPublisher]
extensionVersion [!INCLUDEextensionPublisher]
submissionOperationId [!INCLUDEsubmissionOperationId]

Extension Validation diagnostic reported (LC0210)

Occurs if something was not right when validating the extension on the environment.

[!INCLUDELC0210]

Extension validation completed completed with failures (LC0206)

Occurs if the extension could not compile against the environment.

General dimensions

Dimension Description or value
message Extension validation completed with failures: extension {extensionName} version {extensionVersion} by {extensionPublisher} ({extensionId})

{extensionName} indicates the name of the extension.

{extensionVersion} indicates the version of the extension.

{extensionPublisher} indicates the publisher of the extension.

{extensionId} indicates the id of the extension.

Custom dimensions

Dimension Description or value
eventId LC0206
environmentId [!INCLUDEaadTenantId]
environmentName [!INCLUDEenvironmentName]
environmentType [!INCLUDEenvironmentType]
extensionName Specifies the name of the extension that was to be validated.
extensionId [!INCLUDEextensionId]
extensionPublisher [!INCLUDEextensionPublisher]
extensionVersion [!INCLUDEextensionPublisher]
submissionOperationId [!INCLUDEsubmissionOperationId]
failureReason The overall reason that the extension failed to validate.

Per-tenant extension (PTE) validation completed successfully (LC0202)

Occurs when a per-tenant extension (PTE) validation attempt is completed successfully on the environment (so that the extension was uploaded).

General dimensions

Dimension Description or value
message PTE submission validation request completed successfully: request {submission id}

{submissionId} indicates the identifier for the validation attempt.

Custom dimensions

Dimension Description or value
eventId LC0202
environmentId [!INCLUDEaadTenantId]
environmentName [!INCLUDEenvironmentName]
environmentType [!INCLUDEenvironmentType]
mainExtension A JSON structure that contains information about the extension that was uploaded.
submissionOperationId [!INCLUDEsubmissionOperationId]

Per-tenant extension (PTE) validation completed with failures (LC0203)

Occurs when a new per-tenant extension (PTE) validation attempt completed with failures on the environment (so that the extension was not uploaded).

General dimensions

Dimension Description or value
message PTE validation completed with failures: request {submissionId}

{submissionId} indicates the identifier for the validation attempt.

Custom dimensions

Dimension Description or value
eventId LC0203
environmentId [!INCLUDEaadTenantId]
environmentName [!INCLUDEenvironmentName]
environmentType [!INCLUDEenvironmentType]
mainExtension A json structure that contains information about the extension that is being uploaded.
submissionOperationId [!INCLUDEsubmissionOperationId]
failureReason The overall reason that the extension failed to upload.

Sample KQL code (Per-tenant extension (PTE) validation completed with failures)

This KQL code can help you get started analyzing validation failures for uploading an extension to the environment:

// PTE submission validation request completed with failures: request <submission id>	
traces 
| where customDimensions has "LC0203"
| where customDimensions.eventId == "LC0203"
| where timestamp > ago(30d) // adjust as needed
| extend mainExtension = parse_json(tostring( customDimensions.mainExtension ))
| project timestamp
// in which environment is the extension being validated
, aadTenantId = case(
  isnotempty(customDimensions.aadTenantId), customDimensions.aadTenantId  
, isnotempty(customDimensions.environmentId), customDimensions.environmentId
, 'Unknown'
)
, environmentName = customDimensions.environmentName
// which extension/app is being validated
, mainExtensionId = mainExtension.Id
, mainExtensionPublisher = mainExtension.Publisher
, mainExtensionVersion = mainExtension.Version 
, mainExtensionName = mainExtension.Name 
, dependentExtensions = customDimensions.dependentExtensions
// validation info
, submissionOperationId = customDimensions.submissionOperationId  
, failureReason = customDimensions.failureReason

See also

Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights