Skip to content

Commit

Permalink
Updates in MD, file name cleanup and images
Browse files Browse the repository at this point in the history
  • Loading branch information
katriendg committed Oct 11, 2023
1 parent ea40a9e commit 8ced069
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 13 deletions.
Binary file modified architecture/nested-topology-hld.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified architecture/observability-hld-slide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
2 changes: 1 addition & 1 deletion deployment/deploy-az-demo-bootstrapper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Invoke-WebRequest -Uri "$baseLocation/deployment/deploy-app-l4.ps1" -OutFile "de

mkdir -p bicep/modules
Invoke-WebRequest -Uri "$baseLocation/deployment/bicep/core-infra-aks.bicep" -OutFile "./bicep/core-infra-aks.bicep"
Invoke-WebRequest -Uri "$baseLocation/deployment/bicep/core-infra-vnet.bicep" -OutFile "./bicep/core-infra-vnet.bicep"
Invoke-WebRequest -Uri "$baseLocation/deployment/bicep/core-infra-base.bicep" -OutFile "./bicep/core-infra-base.bicep"
Invoke-WebRequest -Uri "$baseLocation/deployment/bicep/iiot-app.bicep" -OutFile "./bicep/iiot-app.bicep"
Invoke-WebRequest -Uri "$baseLocation/deployment/bicep/modules/acr.bicep" -OutFile "./bicep/modules/acr.bicep"
Invoke-WebRequest -Uri "$baseLocation/deployment/bicep/modules/azurestorage.bicep" -OutFile "./bicep/modules/azurestorage.bicep"
Expand Down
8 changes: 5 additions & 3 deletions deployment/deploy-az-dev-bootstrapper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Import-Module -Name ./modules/process-utils.psm1
Write-Title("Start Deploying")
$startTime = Get-Date
$ApplicationName = $ApplicationName.ToLower()

$samplingRate = ($SetupObservability -eq $true) ? "1" : "0" # in development we set to 1, in prod should be 0.0001 or 0, 0 turns off observability
# --- Ensure Location is set to short name
$Location = Get-AzShortRegion($Location)

Expand All @@ -50,15 +50,17 @@ $l4AppConfig = ./deploy-dev-app-l4.ps1 -ApplicationName $ApplicationName `
-AksClusterResourceGroupName $l4LevelCoreInfra.AksClusterResourceGroupName `
-AksClusterName $l4LevelCoreInfra.AksClusterName -AksServicePrincipalName ($ApplicationName + "L4") `
-Location $Location `
-SetupObservability $SetupObservability
-SetupObservability $SetupObservability `
-SamplingRate $samplingRate

# Note currently for developer flow we need Azure Container Registry deployed by L4 (via L4AppConfig).
./deploy-dev-app-l2.ps1 -ApplicationName $ApplicationName `
-AksClusterName $l2LevelCoreInfra.AksClusterName `
-AksClusterResourceGroupName $l2LevelCoreInfra.AksClusterResourceGroupName `
-AksServicePrincipalName ($ApplicationName + "L2") `
-L4AppConfig $l4AppConfig `
-SetupObservability $SetupObservability
-SetupObservability $SetupObservability `
-SamplingRate $samplingRate

# # --- Deploying just a single layer: comment above block and uncomment below:

Expand Down
2 changes: 1 addition & 1 deletion deployment/deploy-core-infrastructure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ $closeOutboundInternetAccess = If ($SetupArc -eq $true -and $ParentConfig -ne $n
$provisionAzureMonitoring = If ($SetupObservability -eq $true -and $ParentConfig -eq $null) { $true } Else { $false }

$r = (az deployment sub create --location $Location `
--template-file ./bicep/core-infra-vnet.bicep --parameters `
--template-file ./bicep/core-infra-base.bicep --parameters `
applicationName=$ApplicationName `
remoteVnetName=$ParentConfigVnetName `
remoteVnetResourceGroupName=$ParentConfigVnetResourceGroup `
Expand Down
10 changes: 7 additions & 3 deletions deployment/deploy-dev-app-l2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ Param(

[Parameter(Mandatory = $false)]
[bool]
$SetupObservability = $true
$SetupObservability = $true,

[Parameter(Mandatory = $false)]
[int]
$SamplingRate = 0
)

# Uncomment this if you are testing this script without deploy-az-demo-bootstrapper.ps1
Expand Down Expand Up @@ -89,14 +93,14 @@ $simtempimage = $acrName + ".azurecr.io/simulatedtemperaturesensormodule:" + $de
$opcplcimage = "mcr.microsoft.com/iotedge/opc-plc:2.2.0"
$opcpublisherimage = $acrName + ".azurecr.io/$staticBranchName/iotedge/opc-publisher:" + $deploymentId + "-linux-amd64"
$observabilityString = ($SetupObservability -eq $true) ? "true" : "false"
$samplingRate = ($SetupObservability -eq $true) ? "1" : "0" # in development we set to 1, in prod should be 0.0001 or similar, 0 turns off observability


helm install iot-edge-l2 ./helm/iot-edge-l2 `
--set-string images.simulatedtemperaturesensormodule="$simtempimage" `
--set-string images.opcplcmodule="$opcplcimage" `
--set-string images.opcpublishermodule="$opcpublisherimage" `
--set observability.enabled=$observabilityString `
--set-string observability.samplingRate="$samplingRate" `
--set-string observability.samplingRate="$SamplingRate" `
--namespace $appKubernetesNamespace `
--create-namespace `
--wait
Expand Down
9 changes: 6 additions & 3 deletions deployment/deploy-dev-app-l4.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ Param(

[Parameter(Mandatory = $false)]
[bool]
$SetupObservability = $true
$SetupObservability = $true,

[Parameter(Mandatory = $false)]
[int]
$SamplingRate = 0
)

# Uncomment this if you are testing this script without deploy-az-dev-bootstrapper.ps1
Expand Down Expand Up @@ -77,7 +81,6 @@ az aks get-credentials `
--overwrite-existing

$observabilityString = ($SetupObservability -eq $true) ? "true" : "false"
$samplingRate = ($SetupObservability -eq $true) ? "1" : "0" # in development we set to 1, in prod should be 0.0001 or similar
# ----- Run Helm
Write-Title("Install Pod/Containers with Helm in Cluster")
$datagatewaymoduleimage = $acrName + ".azurecr.io/datagatewaymodule:" + $deploymentId
Expand All @@ -86,7 +89,7 @@ helm install iot-edge-l4 ./helm/iot-edge-l4 `
--set-string dataGatewayModule.eventHubConnectionString="$eventHubConnectionString" `
--set-string dataGatewayModule.storageAccountName="$storageName" `
--set-string dataGatewayModule.storageAccountKey="$storageKey" `
--set-string observability.samplingRate="$samplingRate" `
--set-string observability.samplingRate="$SamplingRate" `
--set observability.enabled=$observabilityString `
--namespace $appKubernetesNamespace `
--create-namespace `
Expand Down
4 changes: 2 additions & 2 deletions docs/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ OpenTelemetry consists of two functionalities:

The OpenTelemetry Operator manages OpenTelemetry Collector and allows for auto-instrumentation of code in different languages. When configuring `receivers` that are standard extensions, the operator ensures ClusterIP services are created automatically within the cluster, minimizing custom setup within the deployment approach with custom Helm charts.

Evaluation is still ongoing whether it adds value in this solution to use the Operator, versus managing the Collector directly. The main reason for not using Operator today is the lack of needs for auto-instrumention injection as all custom workloads leverage Dapr which has its own set of monitoring options already integrated.
Evaluation is still ongoing whether it adds value in this solution to use the Operator, versus managing the Collector directly. The main reason for not using Operator today is the lack of needs for auto-instrumentation injection as all custom workloads leverage Dapr which has its own set of monitoring options already integrated.

OpenTelemetry Collector Deployment Options

Expand Down Expand Up @@ -119,7 +119,7 @@ Example of a log entry in the `traces` table in App Insights, customDimensions:
This section contains a number of relevant resources of (initial) built-in OpenTelemetry support for some of the technologies used in this sample.

- **Envoy Proxy**:
- Envoy Proxy has built-in support for OpenTelemetry tracing, but since it relies on TLS termination it's not being implemented in this sample.
- Envoy Proxy has built-in support for [OpenTelemetry request tracing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/observability/tracing#arch-overview-tracing), but since this feature relies on HTTP Connection Manager and HTTP Filters which would require TLS termination, it is not being implemented in this sample.
- Prometheus compatible metrics endpoint is available but requires some special configuration to expose it under its default `/metrics` URI. This special configuration can be observed in Envoy's Helm chart, under the listener named `envoy-prometheus-http-listener` in the configmap.
- **Dapr**: out of the box support for OpenTelemetry tracing and Prometheus metrics scraping. The current implementation uses `Zipkin` endpoint on OpenTelemetry to push traces from Dapr components to OpenTelemetry.
- **Mosquitto** - Mosquitto does not have any native support for metrics or traces with OpenTelemetry. Logs however can be extracted by integrating with Fluent Bit which will collect logs automatically based on annotations. Trace context propagation is not available on the broker, contrary to some of the other open source brokers. There is an initial [draft spec for standardizing W3C Tracing in MQTT](https://w3c.github.io/trace-context-mqtt/).
Expand Down

0 comments on commit 8ced069

Please sign in to comment.