CPU Hovers at 20-30% after OpenCensus has been added to a GCP AppEngine Flex service
See original GitHub issuePlease answer these questions before submitting a bug report.
What version of OpenCensus are you using?
0.12.2
What JVM are you using (java -version
)?
8
What did you do?
If possible, provide a recipe for reproducing the error. Include OpenCensus library in our build.gradle:
compile "io.opencensus:opencensus-api:0.12.2"
compile "io.opencensus:opencensus-exporter-trace-stackdriver:0.12.2"
runtime "io.opencensus:opencensus-impl:0.12.2"
In Spring Boot using GCP AppEngine Flexible, we’ve defined a class to initialize the stackdriver exporter.
package com.jda.starter.utils.tracing;
import com.jda.starter.Application;
import io.opencensus.exporter.trace.stackdriver.StackdriverTraceConfiguration;
import io.opencensus.exporter.trace.stackdriver.StackdriverTraceExporter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Profile;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import java.io.IOException;
@Component
@Profile(Application.Profiles.PRODUCTION)
public class OpenCensusExporterInitializer {
private static final Logger LOGGER = LoggerFactory.getLogger(OpenCensusExporterInitializer.class);
@EventListener(ContextRefreshedEvent.class)
public void contextRefreshedEvent(ContextRefreshedEvent event) {
initialize();
}
private void initialize() {
try {
StackdriverTraceExporter.createAndRegister(StackdriverTraceConfiguration.builder().build());
} catch (IOException exception) {
LOGGER.warn("Could not initialize OpenCensus export to Stackdriver");
}
}
}
What did you expect to see?
CPU to be close to 0 utilization when no traffic takes place.
What did you see instead?
CPU hovering between 20-30% once OpenCesus has been added to a service
Issue Analytics
- State:
- Created 5 years ago
- Comments:23 (16 by maintainers)
Top Results From Across the Web
See raw diff - Hugging Face
... + "榮": 2027, + "構": 2028, + "樊": 2029, + "標": 2030, + "模": 2031, ... + "conver": 4662, + "##iss": 4663,...
Read more >Tag list (ranking) [the most recent 1-year / upper ... - Karatos
Overall ranking; tag name; number of articles ranking; Asking the number of rank; followers number of rank 1;Python;1;2;1 2;JavaScript;2;1;2 3;Ruby;4;3;10
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just ran into this issue as well, but not using AppEngine. Using VisualVM I saw that the crulpit was the
OpenCensus.Disruptor-0
thread, so that confirms the investigation into Disruptor in this issue report.Switching to
-lite
addresses the issue. Using 0.14 with the stackdriver exporter.@steveniemitz see discussion in #1599 as well.