Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade 2.x to 3.0.1 startup warnings #1324

Open
skhilliard opened this issue May 3, 2024 · 7 comments
Open

Upgrade 2.x to 3.0.1 startup warnings #1324

skhilliard opened this issue May 3, 2024 · 7 comments

Comments

@skhilliard
Copy link

Upgrading from 2.x to 3.0.1 I am seeing some warnings logged that look a little worrysome...

@azure/opentelemetry-instrumentation-azure-sdk [
  'Module @azure/core-tracing has been loaded before @azure/opentelemetry-instrumentation-azure-sdk so it might not work, please initialize it before requiring @azure/core-tracing'
]```

and 

Accessing resource attributes before async attributes settled []


...are these of concern?  If so, how can they be fixed?
@JacksonWeber
Copy link
Contributor

Regarding the first warning: #1316. Looking into resolving this with the Azure SDK libraries throwing the warning.

The async attributes settled warning is thrown by OpenTelemetry and occurs because we populate resource attributes asynchronously when trying to determine if the application is running in a VM environment. We are also looking into ways to mitigate this warning as well.

@skhilliard
Copy link
Author

@JacksonWeber Any updates for this? Thanks!

@ghost
Copy link

ghost commented May 25, 2024

I have the same issue.

@JacksonWeber
Copy link
Contributor

@skhilliard @rassiju06 As of 3.1.0 the warnings surrounding performance counter metrics are resolved, however the warnings surrounding package loading and resource attributes are not. Please refer to #1107 if you're looking to suppress these warnings.

@8exgh
Copy link

8exgh commented Jul 4, 2024

Set environment variable:

APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL

to value:

NONE

Without setting logging to NONE, this value is returned by my console app and breaks the client parsing.

@hectorhdzg
Copy link
Member

@8exgh sorry to hear this is breaking something on your side, we were expecting this to only be noisier only, we will prioritize accordingly, this is not a simple change as we use @azure/core-tracing, same package @azure/opentelemetry-instrumentation-azure-sdk is trying to patch using OpenTelemetry

@8exgh
Copy link

8exgh commented Jul 5, 2024

@hectorhdzg from my perspective setting APPLICATION_INSIGHTS_INSTRUMENTATION_LOGGING_LEVEL environment variable to NONE does the trick (valid work around so applicationinsights node_module logs nothing to standard out). But even setting ERROR log level for example, applicationinsights still indirectly logs a message with an empty array as part of the message (the warning excluded from the array), which was surprising to me. So yeah re-iterating, using NONE log level avoids standard output from that node_modules applicationinsights library.

Use case is some custom code in a Dockerfile:

CMD echo "Getting shard number from endpoint" &&
SHARD_NUMBER=$(node getShardHelper.js) && \

which returns an integer to shell script client, which is used to invoke playwright with sharding.

But by default the applicationinsights node_module indirectly writes to standard output for logging, which would result in:

SHARD_NUMBER=SOMELOGTEXT9, which will break the playwright --shard=$SHARD_NUMBER/$TOTAL_SHARDS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants