newrelic / opensource-website

Source code for New Relic's Opensource site.
https://opensource.newrelic.com
Apache License 2.0
145 stars 92 forks source link

container sends data to newrelic but does not show graph #928

Closed leandrojpg closed 2 years ago

leandrojpg commented 2 years ago

Hello everyone, for several months I've been trying to generate a graph of our application that uses netcoreapp2.2 in docker. I used exactly the dockerfile with the instructions below, and however the application appears in the newrelic interface, I generate traffic in the application sending get and post every 1 minute and the only metric I have is the consumption of the cpu/memory container. However data such as througput are on NAN. I've tried to increase the number of calls in the application in a shorter time and still nothing happens. So I ask for help if anyone has gone through this.

FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env WORKDIR /app

ENV http_proxy="http://192.168.1.14:8080" ENV https_proxy="http://192.1.1.14:8080"

Copy csproj and restore the distinct layers

COPY *.csproj ./ RUN dotnet restore

Copy everything else and build

COPY ./ RUN dotnet publish -c Release -o out

Build runtime image

runtime for broker console and aspnet for asp.net core applications

FROM mcr.microsoft.com/dotnet/core/runtime:2.2.3

Environment variable for the service to pass the proxy

ENV http_proxy="http://192.168.1.14:8080" ENV https_proxy="http://192.168.1.14:8080" ENV ENV DEBIAN_FRONTEND=noninteractive RUN apt update && apt upgrade -y

FROM mcr.microsoft.com/dotnet/core/aspnet:2.2

WORKDIR /app COPY --from=build-env /app/out .

Install the agent

RUN apt-get update && apt-get install -y wget ca-certificates gnupg \ && echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list \ && wget https://download.newrelic.com/548C16BF.gpg \ && apt-key add 548C16BF.gpg \ && apt-get update \ && apt-get install -y newrelic-netcore20-agent

Enable the agent

ENV CORECLR_ENABLE_PROFILING=1 \ CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A} \ CORECLR_NEWRELIC_HOME=/usr/local/newrelic-netcore20-agent \ CORECLR_PROFILER_PATH=/usr/local/newrelic-netcore20-agent/libNewRelicProfiler.so \ NEW_RELIC_LICENSE_KEY=xxxxxxxxxxxx \ NEW_RELIC_APP_NAME=URA_TOOAPI2

ENTRYPOINT ["dotnet", "xxx.Broker_Api_Zoado.dll"]

jpvajda commented 2 years ago

@leandrojpg thanks for reporting this, but this repo is for the opensource website, so you'll want to report this problem to your New Relic account manager, or file a support ticket, or look in discuss.newrelic.com for community support if you don't have official new relic support.