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
Add Span amount control mechanism, also memory limit mechanism #570
Add Span amount control mechanism, also memory limit mechanism #570
Conversation
return activeSpanStack.getFirst(); | ||
} | ||
|
||
private boolean isLimitMechanismWorking() { | ||
return spanIdGenerator > Config.Agent.SPAN_LIMIT_PER_SEGMENT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this express should be >=
, because the spanIdGenerator
value is start from 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acurtain You can change that through a pull request. If this is a bug, we have nothing to discuss, just need a fix. Right?
Changes Unknown when pulling 0eb0907 on feature/agent-memory-control into ** on feature/collector-modelization**. |
…ry-control * feature/collector-modelization: (55 commits) Change the exception to runtime exception in module find and service find method. Register graph finish. Application register test success. Fix a code style issue. Move instruments into an independency module in collector, named `apm-collector-instrument`. Remove ServiceInstrumentation mechanism for further collector agent design. Adjust startup sequence. cluster, naming, grpc manager, jetty manager, storage modules test successful. Segment standardization Parse and listener trace workers Register workers no message Add cache service manager in worker construction. Fix compile issues. Support WayToNode for entry node. JVM worker Use cache service from cache module. Refactor cache module to provide cache services. Fix a pom confilct. ...
Changes Unknown when pulling 41e459d on feature/agent-memory-control into ** on feature/collector-modelization**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I want to make sure the amount of spans per segment is estimated, so in some meaning, the memory cost is estimated.
The default amount is 300, because unlikely a server segment trace have more spans than that, of course, you can override it through agent config mechanism.
@peng-yongsheng For collector side, I adjust the network protocol, add a new field
isSizeLimited
. Iftrue
, mean the control mechanism works, and not all spans uplink to collector. In this case, some parent span id in ref(from other backend application) is set to 0, because their parent span does not exist.@ascrutae Since I adjust the core of agent, I think you need to run automatic test and integration test both. Feedback when you have done.
@peng-yongsheng @ascrutae Some days later, we should adjust trace stack UI to tell people the segment don't contain all spans because of control mechanism.
FYI @oracle219, I think you are interesting in this pr.