opencensus-python icon indicating copy to clipboard operation
opencensus-python copied to clipboard

Application Insights Events Collection using OpenCensus does not work with AKS or dockerized application

Open nayanex opened this issue 4 years ago • 1 comments

I am working on the following example provided my Microsoft:

Tutorial: Prepare an application for Azure Kubernetes Service (AKS)

And I added OpenCensus to it, as I am working on an Exercise. This is my GitHub repo

I deployed my repo using Azure Kubernetes Service. it is working fine on http://51.137.25.146/ as shown in image bellow:

Screenshot 2021-08-22 at 14 14 47

However, when I go to Application Insights / Usage / Events I see no results for it. 0 Events

Screenshot 2021-08-22 at 14 29 29

Whereas, if I run that same app locally or using VMSS, I can see data fed into Application / Insights / Usage / Events fine.

Screenshot 2021-08-22 at 14 27 28

This is the repository which contains the version of the app using VMSS:

Azure Voting App VMSS

I thought it was a Kubernetes issue. But just dockerizing the application and running it locally, without deploying to AKS, also, does not work.

Steps to reproduce. Using the following repo:

Azure Voting App - AKS

Perform the following commands

# Use docker-compose.yaml file to create images, and run the application locally using Docker.
# The command below will create two images - one for the frontend and another for backend. 
# The frontend image is built based on the Dockerfile present in the "/azure-vote/" directory. 
# The backend image is built based on a standard Redis image fetched from the Dockerhub
docker-compose up -d

# View images locally 
# You will see two new images - "mcr.microsoft.com/azuredocs/azure-vote-front:v1" and "mcr.microsoft.com/oss/bitnami/redis:6.0.8"
docker images

# You will see two running containers - "azure-vote-front" and "azure-vote-back" 
docker ps
# Go to http://localhost:8080 see the app running

What is the expected behavior? I was hoping to see see data fed into Application / Insights / Usage / Events fine.

Screenshot 2021-08-22 at 14 27 28

What is the actual behavior? When I go to Application Insights / Usage / Events I see no results for it. 0 Events

Screenshot 2021-08-22 at 14 29 29

nayanex avatar Aug 22 '21 12:08 nayanex

@nayanex Are you still experiencing this issue?

lzchen avatar Feb 09 '22 17:02 lzchen