Enabled zipkin configuration

This commit is contained in:
Sumit Ghosh 2021-05-05 14:48:19 +05:30
parent ef548da132
commit 911a5c52be
34 changed files with 127 additions and 59 deletions

View File

@ -1,4 +1,5 @@
{{- $name := include "basket-api.fullname" . -}} {{- $name := include "basket-api.fullname" . -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -15,3 +16,4 @@ data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -36,6 +36,8 @@ env:
key: all__UseAzureServiceBus key: all__UseAzureServiceBus
- name: IdentityUrl - name: IdentityUrl
key: urls__IdentityUrl key: urls__IdentityUrl
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: OrchestratorType - name: OrchestratorType
@ -44,6 +46,8 @@ env:
value: "80" value: "80"
- name: GRPC_PORT - name: GRPC_PORT
value: "81" value: "81"
- name: OTEL_USE_EXPORTER
value: 'zipkin'
probes: probes:
liveness: liveness:
path: /liveness path: /liveness

View File

@ -2,6 +2,7 @@
{{- $sqlsrv := include "sql-name" . -}} {{- $sqlsrv := include "sql-name" . -}}
{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} {{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
{{- $protocol := include "protocol" . -}} {{- $protocol := include "protocol" . -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -19,3 +20,4 @@ data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -38,6 +38,8 @@ env:
key: all__EventBusConnection key: all__EventBusConnection
- name: AzureServiceBusEnabled - name: AzureServiceBusEnabled
key: all__UseAzureServiceBus key: all__UseAzureServiceBus
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
@ -48,6 +50,8 @@ env:
value: "80" value: "80"
- name: GRPC_PORT - name: GRPC_PORT
value: "81" value: "81"
- name: OTEL_USE_EXPORTER
value: 'zipkin'
probes: probes:
liveness: liveness:
path: /liveness path: /liveness

View File

@ -9,6 +9,7 @@
{{- $xamarincallback := include "url-of" (list "xamarincallback" .) -}} {{- $xamarincallback := include "url-of" (list "xamarincallback" .) -}}
{{- $webhooks_url := include "url-of" (list .Values.app.ingress.entries.webhooks .) -}} {{- $webhooks_url := include "url-of" (list .Values.app.ingress.entries.webhooks .) -}}
{{- $webhooksweb_url := include "url-of" (list .Values.app.ingress.entries.webhooksweb .) -}} {{- $webhooksweb_url := include "url-of" (list .Values.app.ingress.entries.webhooksweb .) -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -33,3 +34,4 @@ data:
webhooksapi_e: http://{{ $webhooks_url }} webhooksapi_e: http://{{ $webhooks_url }}
webhooksweb_e: http://{{ $webhooksweb_url }} webhooksweb_e: http://{{ $webhooksweb_url }}
enableDevspaces: "{{ .Values.enableDevspaces }}" enableDevspaces: "{{ .Values.enableDevspaces }}"
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -56,6 +56,8 @@ env:
key: webhooksweb_e key: webhooksweb_e
- name: EnableDevspaces - name: EnableDevspaces
key: enableDevspaces key: enableDevspaces
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
value: Development value: Development
@ -63,7 +65,8 @@ env:
value: 'K8S' value: 'K8S'
- name: IsClusterEnv - name: IsClusterEnv
value: 'True' value: 'True'
- name: OTEL_USE_EXPORTER
value: 'zipkin'
probes: probes:
liveness: liveness:
path: /liveness path: /liveness

View File

@ -1,6 +1,7 @@
{{- $name := include "mobileshoppingagg.fullname" . -}} {{- $name := include "mobileshoppingagg.fullname" . -}}
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} {{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
{{- $protocol := include "protocol" . -}} {{- $protocol := include "protocol" . -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -27,3 +28,4 @@ data:
internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}" internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}"
internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}" internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}"
urls__IdentityUrlExternal: {{ $protocol }}://{{ $identity }} urls__IdentityUrlExternal: {{ $protocol }}://{{ $identity }}
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -59,6 +59,8 @@ env:
key: internalurls__grpcOrdering key: internalurls__grpcOrdering
- name: IdentityUrlExternal - name: IdentityUrlExternal
key: urls__IdentityUrlExternal key: urls__IdentityUrlExternal
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
@ -69,6 +71,8 @@ env:
value: 'K8S' value: 'K8S'
- name: IsClusterEnv - name: IsClusterEnv
value: 'True' value: 'True'
- name: OTEL_USE_EXPORTER
value: 'zipkin'
probes: probes:
liveness: liveness:
path: /liveness path: /liveness

View File

@ -1,5 +1,6 @@
{{- $name := include "ordering-api.fullname" . -}} {{- $name := include "ordering-api.fullname" . -}}
{{- $sqlsrv := include "sql-name" . -}} {{- $sqlsrv := include "sql-name" . -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -16,3 +17,4 @@ data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -43,6 +43,8 @@ env:
key: all__UseAzureServiceBus key: all__UseAzureServiceBus
- name: IdentityUrl - name: IdentityUrl
key: urls__IdentityUrl key: urls__IdentityUrl
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
@ -53,6 +55,8 @@ env:
value: "80" value: "80"
- name: GRPC_PORT - name: GRPC_PORT
value: "81" value: "81"
- name: OTEL_USE_EXPORTER
value: 'zipkin'
probes: probes:
liveness: liveness:
path: /liveness path: /liveness

View File

@ -1,6 +1,7 @@
{{- $name := include "ordering-backgroundtasks.fullname" . -}} {{- $name := include "ordering-backgroundtasks.fullname" . -}}
{{- $sqlsrv := include "sql-name" . -}} {{- $sqlsrv := include "sql-name" . -}}
{{- $cfgname := printf "cfg-%s" $name | trunc 63 }} {{- $cfgname := printf "cfg-%s" $name | trunc 63 }}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -19,3 +20,4 @@ data:
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
graceperiodmanager__CheckUpdateTime: "{{ .Values.cfg.checkUpdateTime }}" graceperiodmanager__CheckUpdateTime: "{{ .Values.cfg.checkUpdateTime }}"
graceperiodmanager__GracePeriodTime: "{{ .Values.cfg.gracePeriodTime }}" graceperiodmanager__GracePeriodTime: "{{ .Values.cfg.gracePeriodTime }}"
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -48,12 +48,16 @@ env:
key: graceperiodmanager__CheckUpdateTime key: graceperiodmanager__CheckUpdateTime
- name: GracePeriodTime - name: GracePeriodTime
key: graceperiodmanager__GracePeriodTime key: graceperiodmanager__GracePeriodTime
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
value: Development value: Development
- name: OrchestratorType - name: OrchestratorType
value: 'K8S' value: 'K8S'
- name: OTEL_USE_EXPORTER
value: 'zipkin'
probes: probes:
liveness: liveness:
path: /liveness path: /liveness

View File

@ -1,5 +1,6 @@
{{- $name := include "ordering-signalrhub.fullname" . -}} {{- $name := include "ordering-signalrhub.fullname" . -}}
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} {{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -16,3 +17,4 @@ data:
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
signalr__StoreConnectionString: {{ .Values.inf.redis.keystore.constr }} signalr__StoreConnectionString: {{ .Values.inf.redis.keystore.constr }}
urls__IdentityUrl: http://identity-api urls__IdentityUrl: http://identity-api
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -46,6 +46,8 @@ env:
key: urls__IdentityUrl key: urls__IdentityUrl
- name: SignalrStoreConnectionString - name: SignalrStoreConnectionString
key: signalr__StoreConnectionString key: signalr__StoreConnectionString
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
@ -54,4 +56,6 @@ env:
value: 'K8S' value: 'K8S'
- name: IsClusterEnv - name: IsClusterEnv
values: 'True' values: 'True'
- name: OTEL_USE_EXPORTER
value: 'zipkin'

View File

@ -1,4 +1,5 @@
{{- $name := include "payment-api.fullname" . -}} {{- $name := include "payment-api.fullname" . -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -13,3 +14,4 @@ data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -36,12 +36,16 @@ env:
key: all__EventBusConnection key: all__EventBusConnection
- name: AzureServiceBusEnabled - name: AzureServiceBusEnabled
key: all__UseAzureServiceBus key: all__UseAzureServiceBus
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
value: Development value: Development
- name: OrchestratorType - name: OrchestratorType
value: 'K8S' value: 'K8S'
- name: OTEL_USE_EXPORTER
value: 'zipkin'
probes: probes:
liveness: liveness:
path: /liveness path: /liveness

View File

@ -2,6 +2,7 @@
{{- $sqlsrv := include "sql-name" . -}} {{- $sqlsrv := include "sql-name" . -}}
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} {{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
{{- $protocol := include "protocol" . -}} {{- $protocol := include "protocol" . -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -19,3 +20,4 @@ data:
all__EventBusConnection: {{ .Values.inf.eventbus.constr }} all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -44,10 +44,14 @@ env:
key: urls__IdentityUrl key: urls__IdentityUrl
- name: IdentityUrlExternal - name: IdentityUrlExternal
key: urls__IdentityUrlExternal key: urls__IdentityUrlExternal
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
value: Development value: Development
- name: OrchestratorType - name: OrchestratorType
value: 'K8S' value: 'K8S'
- name: OTEL_USE_EXPORTER
value: 'zipkin'

View File

@ -3,6 +3,7 @@
{{- $webhooksweb := include "url-of" (list .Values.app.ingress.entries.webhooksweb .) -}} {{- $webhooksweb := include "url-of" (list .Values.app.ingress.entries.webhooksweb .) -}}
{{- $webhooks := include "url-of" (list .Values.app.ingress.entries.webhooks .) -}} {{- $webhooks := include "url-of" (list .Values.app.ingress.entries.webhooks .) -}}
{{- $protocol := include "protocol" . -}} {{- $protocol := include "protocol" . -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -18,3 +19,4 @@ data:
identity_e: {{ $protocol }}://{{ $identity }} identity_e: {{ $protocol }}://{{ $identity }}
webhooksweb_e: {{ $protocol }}://{{ $webhooksweb }} webhooksweb_e: {{ $protocol }}://{{ $webhooksweb }}
urls_webhooksweb: http://{{ .Values.app.svc.webhooksweb }} urls_webhooksweb: http://{{ .Values.app.svc.webhooksweb }}
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -40,6 +40,8 @@ env:
key: webhooksweb_e key: webhooksweb_e
- name: SelfUrl - name: SelfUrl
key: webhooksweb_e key: webhooksweb_e
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
@ -48,5 +50,7 @@ env:
value: 'K8S' value: 'K8S'
- name: Token - name: Token
value: "WebHooks-Demo-Web" # Can use whatever you want value: "WebHooks-Demo-Web" # Can use whatever you want
- name: OTEL_USE_EXPORTER
value: 'zipkin'

View File

@ -1,6 +1,7 @@
{{- $name := include "webshoppingagg.fullname" . -}} {{- $name := include "webshoppingagg.fullname" . -}}
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} {{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
{{- $protocol := include "protocol" . -}} {{- $protocol := include "protocol" . -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -27,3 +28,4 @@ data:
internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}" internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}"
internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}" internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}"
urls__IdentityUrlExternal: {{ $protocol }}://{{ $identity }} urls__IdentityUrlExternal: {{ $protocol }}://{{ $identity }}
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -59,7 +59,8 @@ env:
key: internalurls__grpcOrdering key: internalurls__grpcOrdering
- name: IdentityUrlExternal - name: IdentityUrlExternal
key: urls__IdentityUrlExternal key: urls__IdentityUrlExternal
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
@ -70,6 +71,8 @@ env:
value: 'K8S' value: 'K8S'
- name: IsClusterEnv - name: IsClusterEnv
value: 'True' value: 'True'
- name: OTEL_USE_EXPORTER
value: 'zipkin'
probes: probes:
liveness: liveness:
path: /liveness path: /liveness

View File

@ -4,6 +4,7 @@
{{- $spa := include "url-of" (list .Values.app.ingress.entries.spa .) -}} {{- $spa := include "url-of" (list .Values.app.ingress.entries.spa .) -}}
{{- $mongo := include "mongo-name" . -}} {{- $mongo := include "mongo-name" . -}}
{{- $protocol := include "protocol" . -}} {{- $protocol := include "protocol" . -}}
{{- $zipkin := include "url-of" (list .Values.app.ingress.entries.zipkin .) -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
@ -22,3 +23,4 @@ data:
urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }} urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }}
urls__spa: {{ $protocol }}://{{ $spa }} urls__spa: {{ $protocol }}://{{ $spa }}
urls__IdentityUrl: {{ $protocol }}://{{ $identity }} urls__IdentityUrl: {{ $protocol }}://{{ $identity }}
urls__Otel__ExporterEndpoint: http://{{ .Values.app.svc.zipkin }}:9411/api/v2/spans

View File

@ -44,6 +44,8 @@ env:
key: internalurls__identity__hc key: internalurls__identity__hc
- name: SignalrHubUrl - name: SignalrHubUrl
key: urls__apigwws key: urls__apigwws
- name: OTEL_EXPORTER_TOOL_ENDPOINT
key: urls__Otel__ExporterEndpoint
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
values: values:
- name: ASPNETCORE_ENVIRONMENT - name: ASPNETCORE_ENVIRONMENT
@ -54,4 +56,6 @@ env:
value: 'K8S' value: 'K8S'
- name: IsClusterEnv - name: IsClusterEnv
value: 'True' value: 'True'
- name: OTEL_USE_EXPORTER
value: 'zipkin'

View File

@ -33,6 +33,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" /> <ProjectReference Include="..\..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" />
<ProjectReference Include="..\..\..\OpenTelemetry\OpenTelemetry.Customization.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -22,6 +22,8 @@ using Microsoft.OpenApi.Models;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using OpenTelemetry.Customization.Extensions;
using OpenTelemetry.Customization;
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
{ {
@ -50,6 +52,14 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
.AddDevspaces() .AddDevspaces()
.AddHttpServices() .AddHttpServices()
.AddGrpcServices(); .AddGrpcServices();
// Add Telemetry
services.AddOpenTelemetry(new OpenTelemetryConfig()
{
ServiceName = "mobileshoppingagg",
ExportType = Configuration.GetValue<string>("OTEL_USE_EXPORTER"),
ExportToolEndpoint = Configuration.GetValue<string>("OTEL_EXPORTER_TOOL_ENDPOINT")
});
} }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.

View File

@ -19,9 +19,11 @@ using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Models;
using OpenTelemetry.Customization;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using OpenTelemetry.Customization.Extensions;
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
{ {
@ -50,6 +52,14 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator
.AddDevspaces() .AddDevspaces()
.AddApplicationServices() .AddApplicationServices()
.AddGrpcServices(); .AddGrpcServices();
// Add Telemetry
services.AddOpenTelemetry(new OpenTelemetryConfig()
{
ServiceName = "webshoppingagg",
ExportType = Configuration.GetValue<string>("OTEL_USE_EXPORTER"),
ExportToolEndpoint = Configuration.GetValue<string>("OTEL_EXPORTER_TOOL_ENDPOINT")
});
} }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.

View File

@ -35,6 +35,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" /> <ProjectReference Include="..\..\..\BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj" />
<ProjectReference Include="..\..\..\OpenTelemetry\OpenTelemetry.Customization.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -49,18 +49,6 @@
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="OpenTelemetry" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.Jaeger" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.Zipkin" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc2" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc2" />
<PackageReference Include="OpenTelemetry.Instrumentation.StackExchangeRedis" Version="1.0.0-rc2" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Protobuf Include="Proto\basket.proto" GrpcServices="Server" Generator="MSBuild:Compile" /> <Protobuf Include="Proto\basket.proto" GrpcServices="Server" Generator="MSBuild:Compile" />
<Content Include="@(Protobuf)" /> <Content Include="@(Protobuf)" />

View File

@ -55,6 +55,14 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
options.EnableDetailedErrors = true; options.EnableDetailedErrors = true;
}); });
// Add Telemetry
services.AddOpenTelemetry(new OpenTelemetryConfig()
{
ServiceName = "Basket.API",
ExportType = Configuration.GetValue<string>("OTEL_USE_EXPORTER"),
ExportToolEndpoint = Configuration.GetValue<string>("OTEL_EXPORTER_TOOL_ENDPOINT")
});
RegisterAppInsights(services); RegisterAppInsights(services);
services.AddControllers(options => services.AddControllers(options =>
@ -189,14 +197,6 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory, ConnectionMultiplexer connectionMultiplexer) public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory, ConnectionMultiplexer connectionMultiplexer)
{ {
OpenTelemetryExtensions.AddOpenTelemetry(connectionMultiplexer,new OpenTelemetryConfig()
{
ServiceName = "Basket.API",
ExportType = Configuration.GetValue<string>("OTEL_USE_EXPORTER"),
ExportToolEndpoint = Configuration.GetValue<string>("OTEL_EXPORTER_TOOL_ENDPOINT")
});
//loggerFactory.AddAzureWebAppDiagnostics(); //loggerFactory.AddAzureWebAppDiagnostics();
//loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace); //loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace);

View File

@ -74,18 +74,6 @@
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="OpenTelemetry" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.Jaeger" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.Zipkin" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc2" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc2" />
<PackageReference Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.0.0-rc2" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Update="Setup\*"> <None Update="Setup\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

View File

@ -44,6 +44,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
.AddDevspaces() .AddDevspaces()
.AddHttpClientServices(Configuration); .AddHttpClientServices(Configuration);
// Add Telemetry
services.AddOpenTelemetry(new OpenTelemetryConfig() services.AddOpenTelemetry(new OpenTelemetryConfig()
{ {
ServiceName = "WebMVC", ServiceName = "WebMVC",

View File

@ -48,17 +48,6 @@
<PackageReference Include="Serilog.Sinks.Seq" Version="4.1.0-dev-00166" /> <PackageReference Include="Serilog.Sinks.Seq" Version="4.1.0-dev-00166" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="OpenTelemetry" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.Jaeger" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Exporter.Zipkin" Version="1.0.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc2" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc2" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc2" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="ViewModels\CampaignItem.cs" /> <None Include="ViewModels\CampaignItem.cs" />
</ItemGroup> </ItemGroup>

View File

@ -41,6 +41,16 @@ services:
- OTEL_USE_EXPORTER=zipkin - OTEL_USE_EXPORTER=zipkin
- OTEL_EXPORTER_TOOL_ENDPOINT=${OTEL_EXPORTER_TOOL_ENDPOINT:-http://zipkin:9411/api/v2/spans} - OTEL_EXPORTER_TOOL_ENDPOINT=${OTEL_EXPORTER_TOOL_ENDPOINT:-http://zipkin:9411/api/v2/spans}
webshoppingagg:
environment:
- OTEL_USE_EXPORTER=zipkin
- OTEL_EXPORTER_TOOL_ENDPOINT=${OTEL_EXPORTER_TOOL_ENDPOINT:-http://zipkin:9411/api/v2/spans}
mobileshoppingagg:
environment:
- OTEL_USE_EXPORTER=zipkin
- OTEL_EXPORTER_TOOL_ENDPOINT=${OTEL_EXPORTER_TOOL_ENDPOINT:-http://zipkin:9411/api/v2/spans}
webmvc: webmvc:
environment: environment:
- OTEL_USE_EXPORTER=zipkin - OTEL_USE_EXPORTER=zipkin