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

Prometheus flaky test #1123

Closed
rajkumar-rangaraj opened this issue Aug 23, 2022 · 14 comments · Fixed by #1259
Closed

Prometheus flaky test #1123

rajkumar-rangaraj opened this issue Aug 23, 2022 · 14 comments · Fixed by #1259
Assignees
Milestone

Comments

@rajkumar-rangaraj
Copy link
Contributor

Creating this issue to track failure from test IntegrationTests.SmokeTests.PrometheusExporter. Yesterday there was a different exception.

Error: [xUnit.net 00:00:34.85] IntegrationTests.SmokeTests.PrometheusExporter [FAIL]
16:22:12 [ERR] [xUnit.net 00:00:34.85] IntegrationTests.SmokeTests.PrometheusExporter [FAIL]
16:22:12 [DBG] Failed IntegrationTests.SmokeTests.PrometheusExporter [31 s]
16:22:12 [DBG] Error Message:
16:22:12 [DBG] Did not expect any exceptions after 30s, but found Xunit.Sdk.XunitException with message "Expected string "# HELP process_runtime_dotnet_gc_collections_count Number of garbage collections that have occurred since process start.
16:22:12 [DBG] # TYPE process_runtime_dotnet_gc_collections_count counter
16:22:12 [DBG] process_runtime_dotnet_gc_collections_count{generation="gen2"} 0 1661271707095
16:22:12 [DBG] process_runtime_dotnet_gc_collections_count{generation="gen1"} 0 1661271707095
16:22:12 [DBG] process_runtime_dotnet_gc_collections_count{generation="gen0"} 0 1661271707095
16:22:12 [DBG]
16:22:12 [DBG] # HELP process_runtime_dotnet_assemblies_count The number of .NET assemblies that are currently loaded.
16:22:12 [DBG] # TYPE process_runtime_dotnet_assemblies_count gauge
16:22:12 [DBG] process_runtime_dotnet_assemblies_count 32 1661271707095
16:22:12 [DBG] " to contain "TYPE MyFruitCounter counter"."
16:22:12 [DBG] at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
16:22:12 [DBG] at FluentAssertions.Execution.AssertionScope.FailWith(Func1 failReasonFunc) 16:22:12 [DBG] at FluentAssertions.Primitives.StringAssertions1.Contain(String expected, String because, Object[] becauseArgs)
16:22:12 [DBG] at IntegrationTests.SmokeTests.<>c__DisplayClass9_0.<b__0>d.MoveNext() in D:\a\opentelemetry-dotnet-instrumentation\opentelemetry-dotnet-instrumentation\test\IntegrationTests\SmokeTests.cs:line 177
16:22:12 [DBG] --- End of stack trace from previous location where exception was thrown ---
16:22:12 [DBG] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
16:22:12 [DBG] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:22:12 [DBG] at FluentAssertions.Specialized.AsyncFunctionAssertions2.<InvokeWithInterceptionAsync>d__10.MoveNext() 16:22:12 [DBG] . 16:22:12 [DBG] Stack Trace: 16:22:12 [DBG] at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) 16:22:12 [DBG] at FluentAssertions.Execution.AssertionScope.FailWith(Func1 failReasonFunc)
16:22:12 [DBG] at FluentAssertions.Specialized.AsyncFunctionAssertions`2.<>c__DisplayClass9_0.<g__AssertionTaskAsync|0>d.MoveNext()
16:22:12 [DBG] --- End of stack trace from previous location where exception was thrown ---
16:22:12 [DBG] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
16:22:12 [DBG] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:22:12 [DBG] at IntegrationTests.SmokeTests.d__9.MoveNext() in D:\a\opentelemetry-dotnet-instrumentation\opentelemetry-dotnet-instrumentation\test\IntegrationTests\SmokeTests.cs:line 179
16:22:12 [DBG] --- End of stack trace from previous location where exception was thrown ---
16:22:12 [DBG] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
16:22:12 [DBG] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:22:12 [DBG] --- End of stack trace from previous location where exception was thrown ---
16:22:12 [DBG] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
16:22:12 [DBG] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:22:12 [DBG] --- End of stack trace from previous location where exception was thrown ---
16:22:12 [DBG] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
16:22:12 [DBG] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:22:12 [DBG] Standard Output Messages:
16:22:12 [DBG] Platform: X64
16:22:12 [DBG] Configuration: Release
16:22:12 [DBG] TargetFramework: net462
16:22:12 [DBG] .NET Core: False

@pjanotti
Copy link
Contributor

It seems that we didn't have the expected counter even after 30 seconds. This seems suspicious.

@Kielek Kielek added this to the 0.4.0-beta milestone Aug 24, 2022
@pjanotti pjanotti mentioned this issue Sep 8, 2022
2 tasks
@pjanotti
Copy link
Contributor

pjanotti commented Sep 15, 2022

A few more failures of this test.

#1234 (comment)

@pjanotti
Copy link
Contributor

@Kielek Kielek self-assigned this Sep 19, 2022
@Kielek
Copy link
Contributor

Kielek commented Sep 19, 2022

I hope that it will be fixed by #1239.
Please let me know if Prometheus tests will be failing again.

@pellared
Copy link
Member

@pellared
Copy link
Member

Passed. Congratulations @Kielek 🎉 Closing

@pjanotti
Copy link
Contributor

@pjanotti pjanotti reopened this Sep 19, 2022
@pjanotti
Copy link
Contributor

@pellared and @Kielek

I triggered verify-test: https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/actions/runs/3082544603

From some runs last week I'm suspecting that it is related to different tests somehow interfering with this one. I did multiple runs of a single test on my fork and no repro but I was able to repro on my machine with multiple runs of all tests.

@pellared
Copy link
Member

@pjanotti
Copy link
Contributor

@pellared @Kielek from the logs captured:

[2022-09-21T02:47:08.0225320Z] [Warning] EventSource=OpenTelemetry-Sdk, Message=Measurements from Instrument 'MyFruitCounter', Meter 'MyCompany.MyProduct.MyLibrary' will be ignored. Reason: 'Instrument belongs to a Meter not subscribed by the provider.'. Suggested action: 'Use AddMeter to add the Meter to the provider.' 

@Kielek
Copy link
Contributor

Kielek commented Sep 21, 2022

@pjanotti, I saw it in the log previously, but it was taken from another test. Could you please share exact execution to double check it?

@Kielek Kielek removed their assignment Sep 21, 2022
@pjanotti
Copy link
Contributor

@Kielek you are right: it is not from the same PID as the test failure.

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

Successfully merging a pull request may close this issue.

4 participants